Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppsClient ¶ added in v0.3.0
type AppsClient interface {
ListRepos(ctx context.Context, opt *github.ListOptions) ([]*github.Repository, *github.Response, error)
CreateInstallationToken(ctx context.Context, id int64) (*github.InstallationToken, *github.Response, error)
}
AppsClient for testing purposes
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 GithubApp ¶ added in v0.3.0
type GithubApp struct {
App AppsClient
Installations map[string]int64
Clients map[string]*GithubClient
}
GithubApp ...
type GithubClient ¶ added in v0.3.0
type GithubClient struct {
Repos RepoClient
Apps AppsClient
}
GithubClient ...
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles API calls to AWS.
func NewManager ¶
func NewManager( sess *session.Session, tokenServiceIntegrationID int, tokenServicePrivateKey string, keyServiceIntegrationID int, keyServicePrivateKey string, ) (*Manager, error)
NewManager creates a new manager for handling rotation of Github deploy keys and access tokens.
func NewTestManager ¶
func NewTestManager(s SecretsClient, e EC2Client, tokenService, keyService *GithubApp) *Manager
NewTestManager for testing purposes.
type RepoClient ¶ added in v0.3.0
type RepoClient 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)
}
RepoClient for testing purposes
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 SecretsClient ¶ added in v0.3.0
type SecretsClient secretsmanageriface.SecretsManagerAPI
SecretsClient 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.