Documentation
¶
Index ¶
- Constants
- Variables
- func AddCiService(ctx *core.Context, service CiService) (err error)
- func FindCiServiceWithName(ctx *core.Context, name string) (service keystonefile.CiService, found bool)
- func ListCiServices(ctx *core.Context) (_ []keystonefile.CiService, err error)
- func RemoveCiService(ctx *core.Context, serviceName string) (err error)
- type ApiKey
- type CiService
- func GenericCi(ctx *core.Context, name string) CiService
- func GetCiService(serviceName string, ctx *core.Context, apiUrl string) (CiService, error)
- func GitHubCi(ctx *core.Context, name string, apiUrl string) CiService
- func GitLabCi(ctx *core.Context, name string, apiUrl string) CiService
- func PickCiService(name string, ctx *core.Context, apiUrl string) (CiService, error)
- func SelectCiServiceConfiguration(serviceName string, ctx *core.Context, apiUrl string) (CiService, error)
- type CiServiceType
- type GitlabOptions
- type ServicesKeys
Constants ¶
View Source
const ( GithubCINbSlots = 5 GithubCISLotLength = 64 * 1024 )
View Source
const ( OPTION_KEY_BASE_URL = "base_url" OPTION_KEY_API_KEY = "api_key" OPTION_KEY_PROJECT = "project" )
View Source
const ( SLOT_SIZE = 1024 N_SLOTS = 5 )
Variables ¶
View Source
var ( ErrorMissingCiInformation error = errors.New("missing CI information") ErrorNoCIServiceWithName = errors.New( "no ci service with that name", ) ErrorUnknownServiceType = errors.New("unknown service type") ErrorInvalidServiceType = errors.New("invalid service type") ErrorNoCIServices = errors.New("no ci services") ErrorNoSecretsForEnvironment = errors.New( "no secrets for environment", ) )
View Source
var ( ErrorGithubCIPermissionDenied error = errors.New( "you don't have rights to send secrets to the repo. Please ensure your personal access token has access to \"repo\" scope", ) ErrorGithubCINoSuchRepository = errors.New( "you are trying to send secret to a repository that doesn't exist. Please make sure repo's name and owner is correct", ) ErrorGithubCITooLarge = errors.New( "secrets and files are too large to send to CI", ) )
Functions ¶
func AddCiService ¶
AddCiService adds a CI service configuration to the keystone file
func FindCiServiceWithName ¶
func FindCiServiceWithName( ctx *core.Context, name string, ) (service keystonefile.CiService, found bool)
FindCiServiceWithName returns the CI service configuration matching `name`
func ListCiServices ¶
func ListCiServices(ctx *core.Context) (_ []keystonefile.CiService, err error)
ListCiServices returns the list of configured CI services
Types ¶
type CiService ¶
type CiService interface { Name() string Type() string Usage() string Setup() CiService GetOptions() map[string]string PushSecret(message models.MessagePayload, environment string) CiService CleanSecret(environment string) CiService CheckSetup() CiService Error() error }
func GetCiService ¶
GetCiService function returns an instance of CiService. The service name should be coming from config file, and will be used to determine the type of service to instanciate.
func PickCiService ¶
Asks the user to pick a type of CI service among the available ones It returns a `CiService` instance ready to be setup, and an error
type CiServiceType ¶
type CiServiceType string
const GenericCI CiServiceType = "generic-ci"
const GithubCI CiServiceType = "github-ci"
const GitlabCI CiServiceType = "gitlab-ci"
const (
StubCI CiServiceType = "stub-ci"
)
type GitlabOptions ¶
type ServicesKeys ¶
Click to show internal directories.
Click to hide internal directories.