Documentation
¶
Index ¶
- func New(manager *Manager, secretTemplate, titleTemplate string, logger *logrus.Logger) func(Team) error
- type BooleanString
- type EC2Manager
- type GithubManager
- type Manager
- func (m *Manager) CreateKey(repository Repository, title, publicKey string) error
- func (m *Manager) DeleteKey(repository Repository, id int) error
- func (m *Manager) GenerateKeyPair(title string) (privateKey string, publicKey string, err error)
- func (m *Manager) ListKeys(repository Repository) ([]*github.Key, error)
- func (m *Manager) WriteSecret(name, secret string) error
- type Repository
- type SecretsManager
- type Team
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BooleanString ¶
type BooleanString bool
BooleanString because terraform has their own booleans.
func (*BooleanString) UnmarshalJSON ¶
func (b *BooleanString) UnmarshalJSON(data []byte) error
UnmarshalJSON for terraform booleans..
type GithubManager ¶
type GithubManager interface {
ListKeys(ctx context.Context, owner string, repo string, opt *github.ListOptions) ([]*github.Key, *github.Response, error)
CreateKey(ctx context.Context, owner string, repo string, key *github.Key) (*github.Key, *github.Response, error)
DeleteKey(ctx context.Context, owner string, repo string, id int) (*github.Response, error)
}
GithubManager for testing purposes
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles API calls to AWS.
func NewManager ¶
NewManager creates a new manager from a session, region and Github access token.
func NewTestManager ¶
func NewTestManager(g GithubManager, s SecretsManager, e EC2Manager) *Manager
NewTestManager ...
func (*Manager) CreateKey ¶
func (m *Manager) CreateKey(repository Repository, title, publicKey string) error
CreateKey for a repository.
func (*Manager) DeleteKey ¶
func (m *Manager) DeleteKey(repository Repository, id int) error
DeleteKey for a repository.
func (*Manager) GenerateKeyPair ¶
GenerateKeyPair to use as deploy key.
func (*Manager) ListKeys ¶
func (m *Manager) ListKeys(repository Repository) ([]*github.Key, error)
ListKeys for a repository.
func (*Manager) WriteSecret ¶
WriteSecret to secrets manager.
type Repository ¶
type Repository struct {
Name string `json:"name"`
Owner string `json:"owner"`
ReadOnly BooleanString `json:"readOnly"`
}
Repository represents the configuration of a repository.
type SecretsManager ¶
type SecretsManager secretsmanageriface.SecretsManagerAPI
SecretsManager for testing purposes.
type Team ¶
type Team struct {
Name string `json:"name"`
Repositories []Repository `json:"repositories"`
}
Team represents the configuration for a single CI/CD team.
type Template ¶
Template ...
func NewTemplate ¶
NewTemplate for github key title and secrets manager path.
Click to show internal directories.
Click to hide internal directories.