28 lines
522 B
Go
28 lines
522 B
Go
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() {
|
|
}
|