drone_plugin/config_handler/destination_config.go

28 lines
522 B
Go
Raw Normal View History

2021-12-28 20:42:51 +08:00
package config_handler
import "git.icechen.cn/pkg/drone_plugin/go_handler"
type ApiHandler interface {
ToDestinationConfig() (string, error)
}
func (al ApiList) toDestinationConfig() (string, error) {
return "", nil
}
func (a Api) toDestinationConfig() (string, error) {
var handler ApiHandler
switch a.Type {
case go_handler.TypeGolang:
handler = go_handler.GoApiHandler{}
}
return handler.ToDestinationConfig()
}
func (sl ServiceList) toDestinationConfig() {
}
func (s Service) toDestinationConfig() {
}