From dadab12f7ec5b65531cd3543ea3c8596857ca29f Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 3 Feb 2023 00:40:26 +0000 Subject: [PATCH] change: Deprecate MonitoringURLs (#259) --- cmd/root.go | 2 +- internal/lagoon/client/lgraphql/lgraphql.go | 355 +++++++++----------- pkg/graphql/main.go | 1 - pkg/lagoon/environments/main.go | 3 +- pkg/lagoon/environments/main_test.go | 2 +- pkg/output/main.go | 2 +- 6 files changed, 168 insertions(+), 197 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 081cf0c9..78048555 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -115,7 +115,7 @@ func Execute() { } } -//IsInternetActive() checks to see if we have a viable +// IsInternetActive() checks to see if we have a viable // internet connection. It just tries a quick DNS query. // This requires that the named record be query-able. func isInternetActive() bool { diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index b4239f31..085f2de6 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -1,54 +1,53 @@ -// Code generated by go-bindata. DO NOT EDIT. -// sources: -// _lgraphql/addDeployTarget.graphql (869B) -// _lgraphql/addDeployTargetConfig.graphql (1.325kB) -// _lgraphql/addEnvVariable.graphql (292B) -// _lgraphql/addGroup.graphql (110B) -// _lgraphql/addGroupsToProject.graphql (184B) -// _lgraphql/addNotificationEmail.graphql (183B) -// _lgraphql/addNotificationMicrosoftTeams.graphql (177B) -// _lgraphql/addNotificationRocketChat.graphql (219B) -// _lgraphql/addNotificationSlack.graphql (214B) -// _lgraphql/addNotificationToProject.graphql (289B) -// _lgraphql/addOrUpdateEnvironment.graphql (566B) -// _lgraphql/addProject.graphql (802B) -// _lgraphql/addRestore.graphql (101B) -// _lgraphql/addSshKey.graphql (279B) -// _lgraphql/addUser.graphql (254B) -// _lgraphql/addUserToGroup.graphql (243B) -// _lgraphql/backupsForEnvironmentByName.graphql (403B) -// _lgraphql/deleteDeployTarget.graphql (102B) -// _lgraphql/deleteDeployTargetConfig.graphql (134B) -// _lgraphql/deployEnvironmentBranch.graphql (282B) -// _lgraphql/deployEnvironmentLatest.graphql (181B) -// _lgraphql/deployEnvironmentPromote.graphql (427B) -// _lgraphql/deployEnvironmentPullrequest.graphql (509B) -// _lgraphql/deployTargetConfigsByProjectId.graphql (253B) -// _lgraphql/environmentByName.graphql (306B) -// _lgraphql/lagoonSchema.graphql (126B) -// _lgraphql/lagoonVersion.graphql (25B) -// _lgraphql/listDeployTargets.graphql (231B) -// _lgraphql/me.graphql (232B) -// _lgraphql/minimalProjectByName.graphql (332B) -// _lgraphql/projectByName.graphql (2.123kB) -// _lgraphql/projectByNameMetadata.graphql (121B) -// _lgraphql/projectsByMetadata.graphql (486B) -// _lgraphql/removeProjectMetadataByKey.graphql (254B) -// _lgraphql/switchActiveStandby.graphql (198B) -// _lgraphql/taskByID.graphql (216B) -// _lgraphql/updateDeployTarget.graphql (944B) -// _lgraphql/updateDeployTargetConfig.graphql (661B) -// _lgraphql/updateProjectMetadata.graphql (337B) -// _lgraphql/variables/addOrUpdateEnvVariableByName.graphql (159B) -// _lgraphql/variables/deleteEnvVariableByName.graphql (100B) -// _lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql (184B) - +// Code generated by go-bindata. (@generated) DO NOT EDIT. + +// Package lgraphql generated by go-bindata.// sources: +// _lgraphql/addDeployTarget.graphql +// _lgraphql/addDeployTargetConfig.graphql +// _lgraphql/addEnvVariable.graphql +// _lgraphql/addGroup.graphql +// _lgraphql/addGroupsToProject.graphql +// _lgraphql/addNotificationEmail.graphql +// _lgraphql/addNotificationMicrosoftTeams.graphql +// _lgraphql/addNotificationRocketChat.graphql +// _lgraphql/addNotificationSlack.graphql +// _lgraphql/addNotificationToProject.graphql +// _lgraphql/addOrUpdateEnvironment.graphql +// _lgraphql/addProject.graphql +// _lgraphql/addRestore.graphql +// _lgraphql/addSshKey.graphql +// _lgraphql/addUser.graphql +// _lgraphql/addUserToGroup.graphql +// _lgraphql/backupsForEnvironmentByName.graphql +// _lgraphql/deleteDeployTarget.graphql +// _lgraphql/deleteDeployTargetConfig.graphql +// _lgraphql/deployEnvironmentBranch.graphql +// _lgraphql/deployEnvironmentLatest.graphql +// _lgraphql/deployEnvironmentPromote.graphql +// _lgraphql/deployEnvironmentPullrequest.graphql +// _lgraphql/deployTargetConfigsByProjectId.graphql +// _lgraphql/environmentByName.graphql +// _lgraphql/lagoonSchema.graphql +// _lgraphql/lagoonVersion.graphql +// _lgraphql/listDeployTargets.graphql +// _lgraphql/me.graphql +// _lgraphql/minimalProjectByName.graphql +// _lgraphql/projectByName.graphql +// _lgraphql/projectByNameMetadata.graphql +// _lgraphql/projectsByMetadata.graphql +// _lgraphql/removeProjectMetadataByKey.graphql +// _lgraphql/switchActiveStandby.graphql +// _lgraphql/taskByID.graphql +// _lgraphql/updateDeployTarget.graphql +// _lgraphql/updateDeployTargetConfig.graphql +// _lgraphql/updateProjectMetadata.graphql +// _lgraphql/variables/addOrUpdateEnvVariableByName.graphql +// _lgraphql/variables/deleteEnvVariableByName.graphql +// _lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql package lgraphql import ( "bytes" "compress/gzip" - "crypto/sha256" "fmt" "io" "io/ioutil" @@ -61,7 +60,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("read %q: %w", name, err) + return nil, fmt.Errorf("read %q: %v", name, err) } var buf bytes.Buffer @@ -69,7 +68,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("read %q: %w", name, err) + return nil, fmt.Errorf("read %q: %v", name, err) } if clErr != nil { return nil, err @@ -79,9 +78,8 @@ func bindataRead(data []byte, name string) ([]byte, error) { } type asset struct { - bytes []byte - info os.FileInfo - digest [sha256.Size]byte + bytes []byte + info os.FileInfo } type bindataFileInfo struct { @@ -91,21 +89,32 @@ type bindataFileInfo struct { modTime time.Time } +// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } + +// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } + +// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } + +// ModTime return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } + +// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return false + return fi.mode&os.ModeDir != 0 } + +// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -126,7 +135,7 @@ func _lgraphqlAdddeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc3, 0x39, 0x6d, 0xa8, 0xbd, 0x8c, 0xfa, 0xea, 0x46, 0x56, 0xa4, 0x60, 0x6a, 0x30, 0x79, 0xc7, 0xb, 0x1, 0x74, 0xbf, 0xe1, 0x1a, 0x3b, 0x6f, 0xd9, 0x2b, 0xb0, 0x19, 0xfd, 0x19, 0xb1, 0x1c}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -146,7 +155,7 @@ func _lgraphqlAdddeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x71, 0x8c, 0x5f, 0x57, 0x90, 0x44, 0xc6, 0xd, 0xe, 0xd5, 0x8f, 0x6f, 0x52, 0xdb, 0x34, 0x4, 0xb5, 0x8b, 0x4, 0x49, 0x23, 0x29, 0x7b, 0xbe, 0x48, 0x25, 0xf3, 0x8d, 0xe0, 0xfc, 0x3d}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -166,7 +175,7 @@ func _lgraphqlAddenvvariableGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addEnvVariable.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa4, 0xdf, 0xcc, 0xed, 0x24, 0x54, 0xb9, 0xf9, 0xe9, 0x47, 0xac, 0x18, 0xd2, 0xd4, 0x34, 0x44, 0x55, 0x2b, 0x61, 0x38, 0xb4, 0xbb, 0x34, 0x48, 0x3d, 0xa8, 0xaf, 0xfa, 0x11, 0x11, 0x22, 0xf3}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -186,7 +195,7 @@ func _lgraphqlAddgroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0x26, 0xa3, 0x90, 0xe9, 0x6a, 0x92, 0x6f, 0x20, 0x1a, 0x31, 0x4b, 0x59, 0xd1, 0xd, 0x8a, 0x7a, 0x48, 0xa0, 0xa3, 0x83, 0x94, 0xf9, 0xc2, 0xae, 0x2e, 0x70, 0x6d, 0xad, 0x63, 0xf6, 0x97}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -206,7 +215,7 @@ func _lgraphqlAddgroupstoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addGroupsToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbd, 0x87, 0xa7, 0x9e, 0x69, 0x59, 0xa2, 0x82, 0x97, 0xff, 0x4b, 0x84, 0xf, 0x3e, 0x87, 0x6c, 0xb5, 0xa4, 0x4e, 0x2, 0x7f, 0x58, 0x6b, 0x69, 0x45, 0x9, 0xe2, 0x53, 0x6, 0xc9, 0xa1, 0xac}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -226,7 +235,7 @@ func _lgraphqlAddnotificationemailGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationEmail.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x8d, 0xcc, 0x2d, 0x55, 0xe4, 0xe2, 0x6d, 0x59, 0x6b, 0x9a, 0xe9, 0x33, 0xad, 0x32, 0x3d, 0x2a, 0x8b, 0xe6, 0x36, 0x6d, 0x82, 0x6d, 0x57, 0x1d, 0x38, 0x7a, 0x61, 0xdd, 0x7, 0xae, 0xb5}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -246,7 +255,7 @@ func _lgraphqlAddnotificationmicrosoftteamsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationMicrosoftTeams.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x38, 0x57, 0x95, 0x3f, 0x2d, 0xec, 0x3d, 0x39, 0x8b, 0xf0, 0x86, 0x71, 0x13, 0xe9, 0x11, 0x57, 0x16, 0x27, 0x9c, 0x57, 0x8d, 0x96, 0xfc, 0xf0, 0x6, 0xce, 0xe1, 0x63, 0x5d, 0x40, 0x13, 0xfe}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -266,7 +275,7 @@ func _lgraphqlAddnotificationrocketchatGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationRocketChat.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x78, 0x1, 0x8, 0x7d, 0xb2, 0x2c, 0x6d, 0xf8, 0xa7, 0xa4, 0xec, 0xe0, 0x6d, 0x4c, 0x2a, 0x43, 0x69, 0xbf, 0xe1, 0x6a, 0xa6, 0x3a, 0x51, 0x58, 0x2e, 0xb0, 0xf9, 0x24, 0x50, 0xc, 0xef, 0xba}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -286,7 +295,7 @@ func _lgraphqlAddnotificationslackGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationSlack.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0xd4, 0x90, 0x44, 0x41, 0x48, 0x21, 0xe7, 0x30, 0x6b, 0x0, 0xed, 0x73, 0x6c, 0x1, 0xd, 0xdb, 0xb, 0x83, 0x2, 0x31, 0x7d, 0x79, 0xea, 0xce, 0x87, 0x37, 0x10, 0x4d, 0x1e, 0xfe, 0x3a}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -306,7 +315,7 @@ func _lgraphqlAddnotificationtoprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addNotificationToProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x44, 0x34, 0x3f, 0x65, 0x51, 0xda, 0x1b, 0xe9, 0xd3, 0x3c, 0xbe, 0x8b, 0x47, 0x7, 0x43, 0xfa, 0x61, 0xba, 0x8d, 0x95, 0x2d, 0xdc, 0xda, 0x47, 0x7a, 0x1f, 0xa7, 0xa3, 0xd4, 0x27, 0xaa, 0x75}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -326,7 +335,7 @@ func _lgraphqlAddorupdateenvironmentGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addOrUpdateEnvironment.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9b, 0xa1, 0xe4, 0x5f, 0x61, 0x1e, 0xc1, 0xe, 0x16, 0xa5, 0xbd, 0x25, 0x26, 0x8a, 0x99, 0x77, 0x62, 0x77, 0xb1, 0x9b, 0xa, 0xe8, 0xe4, 0xd1, 0xa7, 0xb9, 0x28, 0xde, 0x9a, 0x88, 0x30, 0xec}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -346,7 +355,7 @@ func _lgraphqlAddprojectGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addProject.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x80, 0x2a, 0x37, 0xa1, 0x42, 0xa6, 0xc4, 0x11, 0x18, 0x79, 0x1e, 0xfb, 0x4f, 0x47, 0x37, 0x1b, 0xf9, 0x12, 0xce, 0xfe, 0x2f, 0x4f, 0xa2, 0xbe, 0x97, 0x59, 0x59, 0xf4, 0x1, 0x2a, 0xc1, 0xa7}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -366,7 +375,7 @@ func _lgraphqlAddrestoreGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addRestore.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0xc1, 0xb5, 0xb5, 0xff, 0xbf, 0x11, 0xc3, 0xe, 0xe1, 0x1e, 0x7f, 0xc6, 0xb6, 0x3b, 0xc5, 0xfb, 0x8b, 0x1a, 0x71, 0xdc, 0xf, 0xe0, 0x3b, 0x80, 0xf8, 0xd7, 0x2c, 0x34, 0x18, 0x91, 0x35}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -386,7 +395,7 @@ func _lgraphqlAddsshkeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addSshKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x82, 0xea, 0xa0, 0xea, 0xaf, 0x19, 0xca, 0xeb, 0x1c, 0x4d, 0x51, 0x9f, 0x9a, 0xb7, 0x86, 0xc8, 0x29, 0x48, 0xa9, 0x6c, 0x3, 0x4a, 0x70, 0x77, 0xa, 0x79, 0x3, 0x16, 0x56, 0x99, 0xba, 0x29}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -406,7 +415,7 @@ func _lgraphqlAdduserGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUser.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x33, 0x99, 0xcc, 0x6c, 0xa, 0x18, 0x88, 0x14, 0x92, 0xc5, 0x0, 0xbc, 0xc2, 0xb4, 0xc1, 0xa7, 0x3f, 0x87, 0xc0, 0x67, 0x13, 0xcc, 0xb7, 0xca, 0xec, 0xde, 0xdf, 0x93, 0x61, 0x6a, 0x4d, 0xe0}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -426,7 +435,7 @@ func _lgraphqlAddusertogroupGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/addUserToGroup.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0xb1, 0xe3, 0xcf, 0x2, 0xfa, 0x37, 0x3c, 0xfb, 0x73, 0x93, 0xf9, 0x16, 0xd4, 0x56, 0x41, 0x23, 0x54, 0x4e, 0x12, 0xc9, 0xda, 0xab, 0x6d, 0x85, 0x14, 0x75, 0xb9, 0xba, 0xc5, 0xd4, 0x46}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -446,7 +455,7 @@ func _lgraphqlBackupsforenvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/backupsForEnvironmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x71, 0x3d, 0xa0, 0xdb, 0xe0, 0x75, 0x3f, 0x29, 0x6, 0x43, 0xf6, 0x56, 0xf2, 0xf4, 0x54, 0x62, 0xe8, 0x76, 0x63, 0x7, 0xff, 0xb8, 0xab, 0x16, 0xc8, 0xf4, 0x4a, 0x75, 0x5d, 0x3b, 0x44, 0xf5}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -466,7 +475,7 @@ func _lgraphqlDeletedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf8, 0x2a, 0x26, 0x25, 0xa0, 0xd0, 0xb0, 0x69, 0xff, 0xac, 0xb1, 0x57, 0xda, 0x80, 0x21, 0x8c, 0x14, 0x58, 0xac, 0x62, 0xac, 0x35, 0x80, 0x42, 0xca, 0x44, 0xb0, 0xee, 0x51, 0x30, 0x79, 0x67}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -486,7 +495,7 @@ func _lgraphqlDeletedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deleteDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xca, 0xa2, 0x13, 0x6e, 0x82, 0xf5, 0xb, 0xf5, 0xac, 0xa3, 0xd0, 0x4b, 0x45, 0xa4, 0x40, 0xfa, 0xd8, 0x35, 0xcf, 0x4e, 0xc4, 0xe4, 0x30, 0x81, 0x31, 0x26, 0xe4, 0x66, 0xa5, 0xa2, 0x56, 0x6a}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -506,7 +515,7 @@ func _lgraphqlDeployenvironmentbranchGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentBranch.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc8, 0xa8, 0x5e, 0x79, 0x81, 0x2d, 0x60, 0xf3, 0x0, 0xed, 0xf0, 0x55, 0xca, 0xd0, 0xec, 0xf, 0x6c, 0x2d, 0x5a, 0x4d, 0x5f, 0xf6, 0xb2, 0x51, 0xd3, 0x23, 0x63, 0xba, 0x7c, 0x61, 0xfc, 0x37}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -526,7 +535,7 @@ func _lgraphqlDeployenvironmentlatestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentLatest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x19, 0x8f, 0xd2, 0xeb, 0x73, 0x78, 0xc7, 0xea, 0xb3, 0x5e, 0x1f, 0xbb, 0x52, 0x5d, 0x35, 0xf4, 0xf, 0xf1, 0x52, 0x47, 0xe6, 0x11, 0x1a, 0xf4, 0x15, 0xc6, 0xcb, 0xc2, 0x18, 0xc9, 0xbb, 0xe1}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -546,7 +555,7 @@ func _lgraphqlDeployenvironmentpromoteGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPromote.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc7, 0x3b, 0x67, 0xc6, 0xa1, 0xb2, 0xa1, 0xb8, 0xe0, 0xbe, 0xbe, 0xe6, 0xbc, 0x44, 0xe0, 0xb2, 0x91, 0xe1, 0xd5, 0x11, 0x92, 0x2a, 0x36, 0x12, 0x8, 0xbf, 0x2c, 0x12, 0xa2, 0xc, 0xd5, 0xec}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -566,7 +575,7 @@ func _lgraphqlDeployenvironmentpullrequestGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployEnvironmentPullrequest.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x63, 0x4a, 0x5f, 0xc4, 0x3e, 0x27, 0x74, 0x38, 0xa1, 0x44, 0x98, 0x53, 0x8c, 0x1f, 0x80, 0x9c, 0x47, 0xf9, 0x2d, 0x72, 0x25, 0x8f, 0xbd, 0xbe, 0xd1, 0x54, 0xb5, 0xda, 0xac, 0x8b, 0xdd}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -586,7 +595,7 @@ func _lgraphqlDeploytargetconfigsbyprojectidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/deployTargetConfigsByProjectId.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x58, 0xad, 0x98, 0xe1, 0xb7, 0x12, 0x27, 0x3e, 0xe9, 0xf4, 0xac, 0xa5, 0xbb, 0xf7, 0x64, 0xd1, 0xce, 0x4a, 0x8a, 0x3f, 0xb2, 0xf9, 0x27, 0xb0, 0xd6, 0xd2, 0xca, 0x47, 0x22, 0x1d, 0xd7, 0xb5}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -606,7 +615,7 @@ func _lgraphqlEnvironmentbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/environmentByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x74, 0x15, 0x91, 0x1a, 0x1e, 0xf5, 0x4, 0x2c, 0x41, 0x27, 0xd3, 0x65, 0x58, 0x69, 0xff, 0x82, 0x37, 0xe4, 0x77, 0x89, 0xf0, 0x8d, 0xfd, 0xb3, 0x9c, 0x22, 0x4, 0xa2, 0xe8, 0x90, 0xc6, 0xe3}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -626,7 +635,7 @@ func _lgraphqlLagoonschemaGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonSchema.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9e, 0xe, 0xea, 0x54, 0xa2, 0xc2, 0x50, 0x45, 0x52, 0xa3, 0x2d, 0xb7, 0x51, 0xef, 0xb, 0x16, 0x78, 0xb0, 0xc8, 0xab, 0xf6, 0x57, 0x59, 0x73, 0xb7, 0x32, 0x67, 0x9a, 0x14, 0x52, 0x5b, 0xd5}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -646,7 +655,7 @@ func _lgraphqlLagoonversionGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/lagoonVersion.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdd, 0x6d, 0x26, 0x13, 0xe1, 0x87, 0x3, 0xf2, 0x97, 0xc1, 0x80, 0x76, 0xf3, 0xf, 0xa8, 0xea, 0x82, 0xb6, 0x64, 0x5c, 0xcc, 0x41, 0x3f, 0x40, 0x95, 0x3c, 0x46, 0xa5, 0x22, 0x1f, 0x8f, 0xb0}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -666,7 +675,7 @@ func _lgraphqlListdeploytargetsGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/listDeployTargets.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfb, 0x1d, 0xee, 0x66, 0xa6, 0x75, 0xc6, 0x3b, 0x70, 0xd5, 0xbc, 0xee, 0x68, 0xe4, 0x17, 0xab, 0x9, 0xd, 0x85, 0x58, 0x5f, 0xdb, 0x57, 0x1b, 0xdb, 0xf1, 0xf8, 0x96, 0x14, 0xf, 0x88, 0x19}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -686,7 +695,7 @@ func _lgraphqlMeGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/me.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x41, 0x6a, 0x4a, 0x7d, 0x6e, 0xb1, 0xa2, 0xea, 0x22, 0xdd, 0xff, 0x81, 0x6e, 0x8d, 0x2a, 0x8a, 0x33, 0x61, 0x21, 0xdc, 0xfe, 0xcf, 0xab, 0x1, 0x5e, 0x31, 0xc8, 0x83, 0xb2, 0x8a, 0xbe, 0x9a}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -706,7 +715,7 @@ func _lgraphqlMinimalprojectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/minimalProjectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf0, 0x9d, 0x3e, 0x8d, 0xa6, 0x4b, 0xb2, 0xed, 0x30, 0xce, 0x1a, 0x58, 0xa2, 0xbe, 0x3d, 0xd, 0x72, 0xd2, 0x56, 0xd7, 0x39, 0xce, 0xe6, 0xc9, 0xa0, 0xc3, 0xbf, 0xd9, 0x70, 0xe3, 0xd5, 0xa8}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -726,7 +735,7 @@ func _lgraphqlProjectbynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x46, 0x98, 0x25, 0x98, 0x83, 0x85, 0x20, 0x45, 0x7e, 0xad, 0x80, 0xde, 0x75, 0x47, 0x13, 0x10, 0x8c, 0x31, 0x6b, 0xda, 0x79, 0x7a, 0x86, 0x3b, 0xa2, 0xc8, 0x3b, 0xea, 0x2a, 0x78, 0xcf, 0xe2}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -746,7 +755,7 @@ func _lgraphqlProjectbynamemetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectByNameMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x11, 0xcb, 0xca, 0xaf, 0x5d, 0xe3, 0x4, 0x41, 0x92, 0xee, 0xbf, 0x3f, 0xeb, 0x91, 0x7, 0xdb, 0xca, 0x4, 0x3e, 0x42, 0x4a, 0xbf, 0xf2, 0x1a, 0x2b, 0xb, 0x7, 0xa6, 0xff, 0x43, 0x58, 0x51}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -766,7 +775,7 @@ func _lgraphqlProjectsbymetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/projectsByMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x7a, 0xc9, 0x5e, 0x44, 0x76, 0xfe, 0xb3, 0x69, 0x39, 0x98, 0xd6, 0x69, 0xb1, 0x33, 0x61, 0xc8, 0x89, 0x1c, 0xe0, 0x35, 0xdd, 0xcd, 0x72, 0xb0, 0x98, 0xcc, 0x47, 0x6f, 0x9d, 0x96, 0x8b}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -786,7 +795,7 @@ func _lgraphqlRemoveprojectmetadatabykeyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/removeProjectMetadataByKey.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x51, 0x5f, 0x3b, 0x9d, 0xd7, 0xe2, 0xc3, 0x44, 0x77, 0xc5, 0xee, 0xd3, 0xf3, 0x0, 0x12, 0x85, 0xf3, 0xc2, 0x63, 0x4e, 0xb3, 0xd3, 0xe3, 0x3, 0xfe, 0x4d, 0x53, 0x0, 0x39, 0xfc, 0x63, 0x76}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -806,7 +815,7 @@ func _lgraphqlSwitchactivestandbyGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/switchActiveStandby.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb3, 0xeb, 0xd9, 0x14, 0xd, 0xb4, 0xf0, 0x79, 0xd5, 0x30, 0x22, 0x3, 0xa9, 0x7b, 0x73, 0xc8, 0xc6, 0xe0, 0x9e, 0xe2, 0xdb, 0x58, 0x38, 0x94, 0xe2, 0x22, 0xde, 0x93, 0x3a, 0x8c, 0xc7, 0x56}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -826,7 +835,7 @@ func _lgraphqlTaskbyidGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/taskByID.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7, 0x21, 0xe7, 0x4b, 0x30, 0x2a, 0x2e, 0x7, 0xac, 0x75, 0xd, 0xdc, 0x51, 0x75, 0x53, 0xa, 0x48, 0x5, 0xbe, 0x8e, 0x29, 0x2, 0x90, 0xe, 0xd3, 0xa6, 0xc7, 0xba, 0x1c, 0x46, 0xa4, 0x82}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -846,7 +855,7 @@ func _lgraphqlUpdatedeploytargetGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTarget.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x62, 0x2f, 0x4f, 0xad, 0xa9, 0x52, 0x1f, 0x88, 0xf0, 0xdf, 0x1f, 0xb6, 0x14, 0xd9, 0x12, 0xa0, 0x81, 0xad, 0xf, 0x1f, 0x7, 0x40, 0x6c, 0x90, 0x1e, 0x3c, 0xe7, 0x21, 0x5c, 0xf2, 0xc3}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -866,7 +875,7 @@ func _lgraphqlUpdatedeploytargetconfigGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateDeployTargetConfig.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x52, 0xc1, 0xcf, 0x85, 0xc0, 0x74, 0x58, 0x4d, 0xc2, 0xc8, 0x90, 0x77, 0xc0, 0x42, 0xca, 0x9f, 0xfa, 0xf9, 0x26, 0x36, 0x3, 0x3, 0x66, 0x85, 0x83, 0xe3, 0xc1, 0xf6, 0x52, 0xfc, 0x68, 0xc1}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -886,7 +895,7 @@ func _lgraphqlUpdateprojectmetadataGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/updateProjectMetadata.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1e, 0x5c, 0x79, 0x65, 0xb3, 0x80, 0xef, 0xe5, 0x67, 0x82, 0x41, 0xba, 0x50, 0x62, 0x30, 0x52, 0xcb, 0x80, 0x62, 0xf1, 0xf6, 0xbb, 0xb7, 0x8c, 0xd9, 0xc5, 0xd7, 0xff, 0xca, 0x96, 0xcc, 0x66}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -906,7 +915,7 @@ func _lgraphqlVariablesAddorupdateenvvariablebynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/variables/addOrUpdateEnvVariableByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x5, 0x9a, 0xe1, 0x52, 0xb6, 0x20, 0x10, 0x57, 0xd4, 0x89, 0xbe, 0x7, 0x86, 0x55, 0x3e, 0x97, 0xbf, 0x40, 0xcb, 0x66, 0x8, 0x8, 0xb0, 0x3f, 0x68, 0xdc, 0x9a, 0xa0, 0x62, 0x6c, 0x5a}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -926,7 +935,7 @@ func _lgraphqlVariablesDeleteenvvariablebynameGraphql() (*asset, error) { } info := bindataFileInfo{name: "_lgraphql/variables/deleteEnvVariableByName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x37, 0xed, 0x1, 0x52, 0x6f, 0x21, 0x73, 0xcd, 0xde, 0xa8, 0x3, 0xde, 0xab, 0xf2, 0x49, 0x6c, 0x26, 0xad, 0x1, 0xbf, 0xcc, 0x87, 0xb6, 0xb6, 0xdb, 0x8b, 0x2c, 0x21, 0xa7, 0x58, 0xbc, 0x48}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -946,7 +955,7 @@ func _lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql() (*asset, } info := bindataFileInfo{name: "_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x56, 0xe9, 0xe2, 0xe4, 0xd9, 0x65, 0x89, 0x3e, 0x6, 0xf4, 0x15, 0x29, 0xeb, 0x4f, 0x7c, 0x33, 0x7a, 0xdd, 0x8e, 0x5c, 0x7d, 0x5b, 0xcb, 0x55, 0xc0, 0xdc, 0x9c, 0x40, 0x93, 0x9d, 0x2f, 0x15}} + a := &asset{bytes: bytes, info: info} return a, nil } @@ -965,12 +974,6 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %s not found", name) } -// AssetString returns the asset contents as a string (instead of a []byte). -func AssetString(name string) (string, error) { - data, err := Asset(name) - return string(data), err -} - // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { @@ -982,12 +985,6 @@ func MustAsset(name string) []byte { return a } -// MustAssetString is like AssetString but panics when Asset would return an -// error. It simplifies safe initialization of global variables. -func MustAssetString(name string) string { - return string(MustAsset(name)) -} - // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. @@ -1003,33 +1000,6 @@ func AssetInfo(name string) (os.FileInfo, error) { return nil, fmt.Errorf("AssetInfo %s not found", name) } -// AssetDigest returns the digest of the file with the given name. It returns an -// error if the asset could not be found or the digest could not be loaded. -func AssetDigest(name string) ([sha256.Size]byte, error) { - canonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[canonicalName]; ok { - a, err := f() - if err != nil { - return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) - } - return a.digest, nil - } - return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) -} - -// Digests returns a map of all known files and their checksums. -func Digests() (map[string][sha256.Size]byte, error) { - mp := make(map[string][sha256.Size]byte, len(_bindata)) - for name := range _bindata { - a, err := _bindata[name]() - if err != nil { - return nil, err - } - mp[name] = a.digest - } - return mp, nil -} - // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -1085,21 +1055,20 @@ var _bindata = map[string]func() (*asset, error){ "_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql": _lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql, } -// AssetDebug is true if the assets were built with the debug flag enabled. -const AssetDebug = false - // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png -// then AssetDir("data") would return []string{"foo.txt", "img"}, -// AssetDir("data/img") would return []string{"a.png", "b.png"}, -// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// +// then AssetDir("data") would return []string{"foo.txt", "img"} +// AssetDir("data/img") would return []string{"a.png", "b.png"} +// AssetDir("foo.txt") and AssetDir("nonexistent") would return an error // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree @@ -1129,55 +1098,55 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "_lgraphql": {nil, map[string]*bintree{ - "addDeployTarget.graphql": {_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, - "addDeployTargetConfig.graphql": {_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, - "addEnvVariable.graphql": {_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, - "addGroup.graphql": {_lgraphqlAddgroupGraphql, map[string]*bintree{}}, - "addGroupsToProject.graphql": {_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, - "addNotificationEmail.graphql": {_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, - "addNotificationMicrosoftTeams.graphql": {_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, - "addNotificationRocketChat.graphql": {_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, - "addNotificationSlack.graphql": {_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, - "addNotificationToProject.graphql": {_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, - "addOrUpdateEnvironment.graphql": {_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, - "addProject.graphql": {_lgraphqlAddprojectGraphql, map[string]*bintree{}}, - "addRestore.graphql": {_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, - "addSshKey.graphql": {_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, - "addUser.graphql": {_lgraphqlAdduserGraphql, map[string]*bintree{}}, - "addUserToGroup.graphql": {_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, - "backupsForEnvironmentByName.graphql": {_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, - "deleteDeployTarget.graphql": {_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, - "deleteDeployTargetConfig.graphql": {_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, - "deployEnvironmentBranch.graphql": {_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, - "deployEnvironmentLatest.graphql": {_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, - "deployEnvironmentPromote.graphql": {_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, - "deployEnvironmentPullrequest.graphql": {_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, - "deployTargetConfigsByProjectId.graphql": {_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, - "environmentByName.graphql": {_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, - "lagoonSchema.graphql": {_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, - "lagoonVersion.graphql": {_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, - "listDeployTargets.graphql": {_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, - "me.graphql": {_lgraphqlMeGraphql, map[string]*bintree{}}, - "minimalProjectByName.graphql": {_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, - "projectByName.graphql": {_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, - "projectByNameMetadata.graphql": {_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, - "projectsByMetadata.graphql": {_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, - "removeProjectMetadataByKey.graphql": {_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, - "switchActiveStandby.graphql": {_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, - "taskByID.graphql": {_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, - "updateDeployTarget.graphql": {_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, - "updateDeployTargetConfig.graphql": {_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, - "updateProjectMetadata.graphql": {_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, - "variables": {nil, map[string]*bintree{ - "addOrUpdateEnvVariableByName.graphql": {_lgraphqlVariablesAddorupdateenvvariablebynameGraphql, map[string]*bintree{}}, - "deleteEnvVariableByName.graphql": {_lgraphqlVariablesDeleteenvvariablebynameGraphql, map[string]*bintree{}}, - "getEnvVariablesByProjectEnvironmentName.graphql": {_lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql, map[string]*bintree{}}, + "_lgraphql": &bintree{nil, map[string]*bintree{ + "addDeployTarget.graphql": &bintree{_lgraphqlAdddeploytargetGraphql, map[string]*bintree{}}, + "addDeployTargetConfig.graphql": &bintree{_lgraphqlAdddeploytargetconfigGraphql, map[string]*bintree{}}, + "addEnvVariable.graphql": &bintree{_lgraphqlAddenvvariableGraphql, map[string]*bintree{}}, + "addGroup.graphql": &bintree{_lgraphqlAddgroupGraphql, map[string]*bintree{}}, + "addGroupsToProject.graphql": &bintree{_lgraphqlAddgroupstoprojectGraphql, map[string]*bintree{}}, + "addNotificationEmail.graphql": &bintree{_lgraphqlAddnotificationemailGraphql, map[string]*bintree{}}, + "addNotificationMicrosoftTeams.graphql": &bintree{_lgraphqlAddnotificationmicrosoftteamsGraphql, map[string]*bintree{}}, + "addNotificationRocketChat.graphql": &bintree{_lgraphqlAddnotificationrocketchatGraphql, map[string]*bintree{}}, + "addNotificationSlack.graphql": &bintree{_lgraphqlAddnotificationslackGraphql, map[string]*bintree{}}, + "addNotificationToProject.graphql": &bintree{_lgraphqlAddnotificationtoprojectGraphql, map[string]*bintree{}}, + "addOrUpdateEnvironment.graphql": &bintree{_lgraphqlAddorupdateenvironmentGraphql, map[string]*bintree{}}, + "addProject.graphql": &bintree{_lgraphqlAddprojectGraphql, map[string]*bintree{}}, + "addRestore.graphql": &bintree{_lgraphqlAddrestoreGraphql, map[string]*bintree{}}, + "addSshKey.graphql": &bintree{_lgraphqlAddsshkeyGraphql, map[string]*bintree{}}, + "addUser.graphql": &bintree{_lgraphqlAdduserGraphql, map[string]*bintree{}}, + "addUserToGroup.graphql": &bintree{_lgraphqlAddusertogroupGraphql, map[string]*bintree{}}, + "backupsForEnvironmentByName.graphql": &bintree{_lgraphqlBackupsforenvironmentbynameGraphql, map[string]*bintree{}}, + "deleteDeployTarget.graphql": &bintree{_lgraphqlDeletedeploytargetGraphql, map[string]*bintree{}}, + "deleteDeployTargetConfig.graphql": &bintree{_lgraphqlDeletedeploytargetconfigGraphql, map[string]*bintree{}}, + "deployEnvironmentBranch.graphql": &bintree{_lgraphqlDeployenvironmentbranchGraphql, map[string]*bintree{}}, + "deployEnvironmentLatest.graphql": &bintree{_lgraphqlDeployenvironmentlatestGraphql, map[string]*bintree{}}, + "deployEnvironmentPromote.graphql": &bintree{_lgraphqlDeployenvironmentpromoteGraphql, map[string]*bintree{}}, + "deployEnvironmentPullrequest.graphql": &bintree{_lgraphqlDeployenvironmentpullrequestGraphql, map[string]*bintree{}}, + "deployTargetConfigsByProjectId.graphql": &bintree{_lgraphqlDeploytargetconfigsbyprojectidGraphql, map[string]*bintree{}}, + "environmentByName.graphql": &bintree{_lgraphqlEnvironmentbynameGraphql, map[string]*bintree{}}, + "lagoonSchema.graphql": &bintree{_lgraphqlLagoonschemaGraphql, map[string]*bintree{}}, + "lagoonVersion.graphql": &bintree{_lgraphqlLagoonversionGraphql, map[string]*bintree{}}, + "listDeployTargets.graphql": &bintree{_lgraphqlListdeploytargetsGraphql, map[string]*bintree{}}, + "me.graphql": &bintree{_lgraphqlMeGraphql, map[string]*bintree{}}, + "minimalProjectByName.graphql": &bintree{_lgraphqlMinimalprojectbynameGraphql, map[string]*bintree{}}, + "projectByName.graphql": &bintree{_lgraphqlProjectbynameGraphql, map[string]*bintree{}}, + "projectByNameMetadata.graphql": &bintree{_lgraphqlProjectbynamemetadataGraphql, map[string]*bintree{}}, + "projectsByMetadata.graphql": &bintree{_lgraphqlProjectsbymetadataGraphql, map[string]*bintree{}}, + "removeProjectMetadataByKey.graphql": &bintree{_lgraphqlRemoveprojectmetadatabykeyGraphql, map[string]*bintree{}}, + "switchActiveStandby.graphql": &bintree{_lgraphqlSwitchactivestandbyGraphql, map[string]*bintree{}}, + "taskByID.graphql": &bintree{_lgraphqlTaskbyidGraphql, map[string]*bintree{}}, + "updateDeployTarget.graphql": &bintree{_lgraphqlUpdatedeploytargetGraphql, map[string]*bintree{}}, + "updateDeployTargetConfig.graphql": &bintree{_lgraphqlUpdatedeploytargetconfigGraphql, map[string]*bintree{}}, + "updateProjectMetadata.graphql": &bintree{_lgraphqlUpdateprojectmetadataGraphql, map[string]*bintree{}}, + "variables": &bintree{nil, map[string]*bintree{ + "addOrUpdateEnvVariableByName.graphql": &bintree{_lgraphqlVariablesAddorupdateenvvariablebynameGraphql, map[string]*bintree{}}, + "deleteEnvVariableByName.graphql": &bintree{_lgraphqlVariablesDeleteenvvariablebynameGraphql, map[string]*bintree{}}, + "getEnvVariablesByProjectEnvironmentName.graphql": &bintree{_lgraphqlVariablesGetenvvariablesbyprojectenvironmentnameGraphql, map[string]*bintree{}}, }}, }}, }} -// RestoreAsset restores an asset under the given directory. +// RestoreAsset restores an asset under the given directory func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { @@ -1195,10 +1164,14 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) + err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) + if err != nil { + return err + } + return nil } -// RestoreAssets restores an asset under the given directory recursively. +// RestoreAssets restores an asset under the given directory recursively func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File diff --git a/pkg/graphql/main.go b/pkg/graphql/main.go index 2a12e897..dee8b92a 100644 --- a/pkg/graphql/main.go +++ b/pkg/graphql/main.go @@ -259,7 +259,6 @@ var EnvironmentByNameFragment = `fragment Environment on Environment { updated created deleted - monitoringUrls deployTitle deployBaseRef deployHeadRef diff --git a/pkg/lagoon/environments/main.go b/pkg/lagoon/environments/main.go index fa03da08..aed74160 100644 --- a/pkg/lagoon/environments/main.go +++ b/pkg/lagoon/environments/main.go @@ -147,7 +147,6 @@ func processEnvExtra(environment api.Environment) []string { envOpenshiftProjectName := returnNonEmptyString(string(environment.OpenshiftProjectName)) envRoute := returnNonEmptyString(string(environment.Route)) envRoutes := returnNonEmptyString(string(environment.Routes)) - envMonitoringUrls := returnNonEmptyString(string(environment.MonitoringUrls)) envDeployTitle := returnNonEmptyString(string(environment.DeployTitle)) envDeployBaseRef := returnNonEmptyString(string(environment.DeployBaseRef)) envDeployHeadRef := returnNonEmptyString(string(environment.DeployHeadRef)) @@ -161,7 +160,7 @@ func processEnvExtra(environment api.Environment) []string { fmt.Sprintf("%v", envOpenshiftProjectName), fmt.Sprintf("%v", envRoute), fmt.Sprintf("%v", envRoutes), - fmt.Sprintf("%v", envMonitoringUrls), + fmt.Sprintf("%v", "-"), // MonitoringURLS is deprecated, don't query this data fmt.Sprintf("%v", envAutoIdle), fmt.Sprintf("%v", envDeployTitle), fmt.Sprintf("%v", envDeployBaseRef), diff --git a/pkg/lagoon/environments/main_test.go b/pkg/lagoon/environments/main_test.go index 3096c050..a8cdcca4 100644 --- a/pkg/lagoon/environments/main_test.go +++ b/pkg/lagoon/environments/main_test.go @@ -18,7 +18,7 @@ func checkEqual(t *testing.T, got, want interface{}, msgs ...interface{}) { } func TestGetEnvironmentByName(t *testing.T) { - var all = `{"autoIdle":1,"created":"2019-10-29 04:26:11","deleted":"0000-00-00 00:00:00","deployBaseRef":"Master","deployHeadRef":null,"deployTitle":null,"deployType":"branch","environmentType":"production","id":3,"monitoringUrls":null,"name":"Master","openshiftProjectName":"high-cotton-master","route":"http://highcotton.org","routes":"http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","updated":"2019-10-29 04:26:43"}` + var all = `{"autoIdle":1,"created":"2019-10-29 04:26:11","deleted":"0000-00-00 00:00:00","deployBaseRef":"Master","deployHeadRef":null,"deployTitle":null,"deployType":"branch","environmentType":"production","id":3,"name":"Master","openshiftProjectName":"high-cotton-master","route":"http://highcotton.org","routes":"http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","updated":"2019-10-29 04:26:43"}` var allSuccess = `{"header":["ID","EnvironmentName","EnvironmentType","DeployType","Created","OpenshiftProjectName","Route","Routes","MonitoringURLS","AutoIdle","DeployTitle","DeployBaseRef","DeployHeadRef"],"data":[["3","Master","production","branch","2019-10-29 04:26:11","high-cotton-master","http://highcotton.org","http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","-","1","-","Master","-"]]}` testResult, err := processEnvInfo([]byte(all)) diff --git a/pkg/output/main.go b/pkg/output/main.go index 8bc59a14..756bd69c 100644 --- a/pkg/output/main.go +++ b/pkg/output/main.go @@ -19,7 +19,7 @@ type Table struct { // Data . type Data []string -//Options . +// Options . type Options struct { Header bool CSV bool