Documentation
¶
Index ¶
- Constants
- type GithubBatchExecutor
- func (g *GithubBatchExecutor) AddRuleset(ctx context.Context, dryrun bool, ruleset *engine.GithubRuleSet)
- func (g *GithubBatchExecutor) AddUserToOrg(ctx context.Context, dryrun bool, ghuserid string)
- func (g *GithubBatchExecutor) Begin(dryrun bool)
- func (g *GithubBatchExecutor) Commit(ctx context.Context, dryrun bool) error
- func (g *GithubBatchExecutor) CreateRepository(ctx context.Context, dryrun bool, reponame string, description string, ...)
- func (g *GithubBatchExecutor) CreateTeam(ctx context.Context, dryrun bool, teamname string, description string, ...)
- func (g *GithubBatchExecutor) DeleteRepository(ctx context.Context, dryrun bool, reponame string)
- func (g *GithubBatchExecutor) DeleteRuleset(ctx context.Context, dryrun bool, rulesetid int)
- func (g *GithubBatchExecutor) DeleteTeam(ctx context.Context, dryrun bool, teamslug string)
- func (g *GithubBatchExecutor) RemoveUserFromOrg(ctx context.Context, dryrun bool, ghuserid string)
- func (g *GithubBatchExecutor) Rollback(dryrun bool, err error)
- func (g *GithubBatchExecutor) UpdateRepositoryAddTeamAccess(ctx context.Context, dryrun bool, reponame string, teamslug string, ...)
- func (g *GithubBatchExecutor) UpdateRepositoryRemoveExternalUser(ctx context.Context, dryrun bool, reponame string, githubid string)
- func (g *GithubBatchExecutor) UpdateRepositoryRemoveInternalUser(ctx context.Context, dryrun bool, reponame string, githubid string)
- func (g *GithubBatchExecutor) UpdateRepositoryRemoveTeamAccess(ctx context.Context, dryrun bool, reponame string, teamslug string)
- func (g *GithubBatchExecutor) UpdateRepositorySetExternalUser(ctx context.Context, dryrun bool, reponame string, githubid string, ...)
- func (g *GithubBatchExecutor) UpdateRepositoryUpdateBoolProperty(ctx context.Context, dryrun bool, reponame string, propertyName string, ...)
- func (g *GithubBatchExecutor) UpdateRepositoryUpdateTeamAccess(ctx context.Context, dryrun bool, reponame string, teamslug string, ...)
- func (g *GithubBatchExecutor) UpdateRuleset(ctx context.Context, dryrun bool, ruleset *engine.GithubRuleSet)
- func (g *GithubBatchExecutor) UpdateTeamAddMember(ctx context.Context, dryrun bool, teamslug string, username string, ...)
- func (g *GithubBatchExecutor) UpdateTeamRemoveMember(ctx context.Context, dryrun bool, teamslug string, username string)
- func (g *GithubBatchExecutor) UpdateTeamSetParent(ctx context.Context, dryrun bool, teamslug string, parentTeam *int)
- func (g *GithubBatchExecutor) UpdateTeamUpdateMember(ctx context.Context, dryrun bool, teamslug string, username string, ...)
- type GithubCommand
- type GithubCommandAddRuletset
- type GithubCommandAddUserToOrg
- type GithubCommandCreateRepository
- type GithubCommandCreateTeam
- type GithubCommandDeleteRepository
- type GithubCommandDeleteRuletset
- type GithubCommandDeleteTeam
- type GithubCommandRemoveUserFromOrg
- type GithubCommandUpdateRepositoryAddTeamAccess
- type GithubCommandUpdateRepositoryRemoveExternalUser
- type GithubCommandUpdateRepositoryRemoveInternalUser
- type GithubCommandUpdateRepositoryRemoveTeamAccess
- type GithubCommandUpdateRepositorySetExternalUser
- type GithubCommandUpdateRepositoryUpdateBoolProperty
- type GithubCommandUpdateRepositoryUpdateTeamAccess
- type GithubCommandUpdateRuletset
- type GithubCommandUpdateTeamAddMember
- type GithubCommandUpdateTeamRemoveMember
- type GithubCommandUpdateTeamSetParent
- type GithubCommandUpdateTeamUpdateMember
- type GithubWebhookServer
- type GithubWebhookServerCallback
- type GithubWebhookServerImpl
- type Goliac
- type GoliacImpl
- func (g *GoliacImpl) Apply(ctx context.Context, fs billy.Filesystem, dryrun bool, ...) (error, []error, []entity.Warning, *engine.UnmanagedResources)
- func (g *GoliacImpl) FlushCache()
- func (g *GoliacImpl) GetLocal() engine.GoliacLocalResources
- func (g *GoliacImpl) SetRemoteObservability(feedback observability.RemoteObservability) error
- func (g *GoliacImpl) UsersUpdate(ctx context.Context, fs billy.Filesystem, repositoryUrl, branch string, ...) (bool, error)
- type GoliacLight
- type GoliacLightImpl
- type GoliacObservability
- type GoliacServer
- type GoliacServerImpl
- func (g *GoliacServerImpl) GetCollaborator(params app.GetCollaboratorParams) middleware.Responder
- func (g *GoliacServerImpl) GetCollaborators(app.GetCollaboratorsParams) middleware.Responder
- func (g *GoliacServerImpl) GetLiveness(params health.GetLivenessParams) middleware.Responder
- func (g *GoliacServerImpl) GetReadiness(params health.GetReadinessParams) middleware.Responder
- func (g *GoliacServerImpl) GetRepositories(app.GetRepositoriesParams) middleware.Responder
- func (g *GoliacServerImpl) GetRepository(params app.GetRepositoryParams) middleware.Responder
- func (g *GoliacServerImpl) GetStatistics(app.GetStatiticsParams) middleware.Responder
- func (g *GoliacServerImpl) GetStatus(app.GetStatusParams) middleware.Responder
- func (g *GoliacServerImpl) GetTeam(params app.GetTeamParams) middleware.Responder
- func (g *GoliacServerImpl) GetTeams(app.GetTeamsParams) middleware.Responder
- func (g *GoliacServerImpl) GetUnmanaged(app.GetUnmanagedParams) middleware.Responder
- func (g *GoliacServerImpl) GetUser(params app.GetUserParams) middleware.Responder
- func (g *GoliacServerImpl) GetUsers(app.GetUsersParams) middleware.Responder
- func (g *GoliacServerImpl) PostFlushCache(app.PostFlushCacheParams) middleware.Responder
- func (g *GoliacServerImpl) PostResync(app.PostResyncParams) middleware.Responder
- func (g *GoliacServerImpl) Serve()
- func (g *GoliacServerImpl) StartRESTApi() (*restapi.Server, error)
- type LoadGithubSamlUsers
- type PushEvent
- type Scaffold
Constants ¶
const (
GOLIAC_GIT_TAG = "goliac"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubBatchExecutor ¶
type GithubBatchExecutor struct {
// contains filtered or unexported fields
}
* GithubBatchExecutor will collects all commands to apply * if there the number of changes to apply is not too big, it will apply on the `Commit()` * Usage: * gal := NewGithubBatchExecutor(client) * gal.Begin() * gal.Create... * gal.Update... * ... * gal.Commit()
func NewGithubBatchExecutor ¶
func NewGithubBatchExecutor(client engine.ReconciliatorExecutor, maxChangesets int) *GithubBatchExecutor
func (*GithubBatchExecutor) AddRuleset ¶
func (g *GithubBatchExecutor) AddRuleset(ctx context.Context, dryrun bool, ruleset *engine.GithubRuleSet)
func (*GithubBatchExecutor) AddUserToOrg ¶
func (g *GithubBatchExecutor) AddUserToOrg(ctx context.Context, dryrun bool, ghuserid string)
func (*GithubBatchExecutor) Begin ¶
func (g *GithubBatchExecutor) Begin(dryrun bool)
func (*GithubBatchExecutor) Commit ¶
func (g *GithubBatchExecutor) Commit(ctx context.Context, dryrun bool) error
func (*GithubBatchExecutor) CreateRepository ¶
func (*GithubBatchExecutor) CreateTeam ¶
func (*GithubBatchExecutor) DeleteRepository ¶
func (g *GithubBatchExecutor) DeleteRepository(ctx context.Context, dryrun bool, reponame string)
func (*GithubBatchExecutor) DeleteRuleset ¶
func (g *GithubBatchExecutor) DeleteRuleset(ctx context.Context, dryrun bool, rulesetid int)
func (*GithubBatchExecutor) DeleteTeam ¶
func (g *GithubBatchExecutor) DeleteTeam(ctx context.Context, dryrun bool, teamslug string)
func (*GithubBatchExecutor) RemoveUserFromOrg ¶
func (g *GithubBatchExecutor) RemoveUserFromOrg(ctx context.Context, dryrun bool, ghuserid string)
func (*GithubBatchExecutor) Rollback ¶
func (g *GithubBatchExecutor) Rollback(dryrun bool, err error)
func (*GithubBatchExecutor) UpdateRepositoryAddTeamAccess ¶
func (*GithubBatchExecutor) UpdateRepositoryRemoveExternalUser ¶ added in v0.2.1
func (*GithubBatchExecutor) UpdateRepositoryRemoveInternalUser ¶ added in v0.11.8
func (*GithubBatchExecutor) UpdateRepositoryRemoveTeamAccess ¶
func (*GithubBatchExecutor) UpdateRepositorySetExternalUser ¶ added in v0.2.1
func (*GithubBatchExecutor) UpdateRepositoryUpdateBoolProperty ¶ added in v0.5.0
func (*GithubBatchExecutor) UpdateRepositoryUpdateTeamAccess ¶
func (*GithubBatchExecutor) UpdateRuleset ¶
func (g *GithubBatchExecutor) UpdateRuleset(ctx context.Context, dryrun bool, ruleset *engine.GithubRuleSet)
func (*GithubBatchExecutor) UpdateTeamAddMember ¶
func (g *GithubBatchExecutor) UpdateTeamAddMember(ctx context.Context, dryrun bool, teamslug string, username string, role string)
role = member or maintainer (usually we use member)
func (*GithubBatchExecutor) UpdateTeamRemoveMember ¶
func (*GithubBatchExecutor) UpdateTeamSetParent ¶ added in v0.8.0
func (*GithubBatchExecutor) UpdateTeamUpdateMember ¶ added in v0.10.5
func (g *GithubBatchExecutor) UpdateTeamUpdateMember(ctx context.Context, dryrun bool, teamslug string, username string, role string)
role = member or maintainer (usually we use member)
type GithubCommand ¶
*
- Each command/mutation we want to perform will be isloated into a GithubCommand
- object, so we can regroup all of them to apply (or cancel) them in batch
type GithubCommandAddRuletset ¶
type GithubCommandAddRuletset struct {
// contains filtered or unexported fields
}
func (*GithubCommandAddRuletset) Apply ¶
func (g *GithubCommandAddRuletset) Apply(ctx context.Context)
type GithubCommandAddUserToOrg ¶
type GithubCommandAddUserToOrg struct {
// contains filtered or unexported fields
}
func (*GithubCommandAddUserToOrg) Apply ¶
func (g *GithubCommandAddUserToOrg) Apply(ctx context.Context)
type GithubCommandCreateRepository ¶
type GithubCommandCreateRepository struct {
// contains filtered or unexported fields
}
func (*GithubCommandCreateRepository) Apply ¶
func (g *GithubCommandCreateRepository) Apply(ctx context.Context)
type GithubCommandCreateTeam ¶
type GithubCommandCreateTeam struct {
// contains filtered or unexported fields
}
func (*GithubCommandCreateTeam) Apply ¶
func (g *GithubCommandCreateTeam) Apply(ctx context.Context)
type GithubCommandDeleteRepository ¶
type GithubCommandDeleteRepository struct {
// contains filtered or unexported fields
}
func (*GithubCommandDeleteRepository) Apply ¶
func (g *GithubCommandDeleteRepository) Apply(ctx context.Context)
type GithubCommandDeleteRuletset ¶
type GithubCommandDeleteRuletset struct {
// contains filtered or unexported fields
}
func (*GithubCommandDeleteRuletset) Apply ¶
func (g *GithubCommandDeleteRuletset) Apply(ctx context.Context)
type GithubCommandDeleteTeam ¶
type GithubCommandDeleteTeam struct {
// contains filtered or unexported fields
}
func (*GithubCommandDeleteTeam) Apply ¶
func (g *GithubCommandDeleteTeam) Apply(ctx context.Context)
type GithubCommandRemoveUserFromOrg ¶
type GithubCommandRemoveUserFromOrg struct {
// contains filtered or unexported fields
}
func (*GithubCommandRemoveUserFromOrg) Apply ¶
func (g *GithubCommandRemoveUserFromOrg) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryAddTeamAccess ¶
type GithubCommandUpdateRepositoryAddTeamAccess struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryAddTeamAccess) Apply ¶
func (g *GithubCommandUpdateRepositoryAddTeamAccess) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryRemoveExternalUser ¶ added in v0.2.1
type GithubCommandUpdateRepositoryRemoveExternalUser struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryRemoveExternalUser) Apply ¶ added in v0.2.1
func (g *GithubCommandUpdateRepositoryRemoveExternalUser) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryRemoveInternalUser ¶ added in v0.11.8
type GithubCommandUpdateRepositoryRemoveInternalUser struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryRemoveInternalUser) Apply ¶ added in v0.11.8
func (g *GithubCommandUpdateRepositoryRemoveInternalUser) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryRemoveTeamAccess ¶
type GithubCommandUpdateRepositoryRemoveTeamAccess struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryRemoveTeamAccess) Apply ¶
func (g *GithubCommandUpdateRepositoryRemoveTeamAccess) Apply(ctx context.Context)
type GithubCommandUpdateRepositorySetExternalUser ¶ added in v0.2.1
type GithubCommandUpdateRepositorySetExternalUser struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositorySetExternalUser) Apply ¶ added in v0.2.1
func (g *GithubCommandUpdateRepositorySetExternalUser) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryUpdateBoolProperty ¶ added in v0.5.0
type GithubCommandUpdateRepositoryUpdateBoolProperty struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryUpdateBoolProperty) Apply ¶ added in v0.5.0
func (g *GithubCommandUpdateRepositoryUpdateBoolProperty) Apply(ctx context.Context)
type GithubCommandUpdateRepositoryUpdateTeamAccess ¶
type GithubCommandUpdateRepositoryUpdateTeamAccess struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRepositoryUpdateTeamAccess) Apply ¶
func (g *GithubCommandUpdateRepositoryUpdateTeamAccess) Apply(ctx context.Context)
type GithubCommandUpdateRuletset ¶
type GithubCommandUpdateRuletset struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateRuletset) Apply ¶
func (g *GithubCommandUpdateRuletset) Apply(ctx context.Context)
type GithubCommandUpdateTeamAddMember ¶
type GithubCommandUpdateTeamAddMember struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateTeamAddMember) Apply ¶
func (g *GithubCommandUpdateTeamAddMember) Apply(ctx context.Context)
type GithubCommandUpdateTeamRemoveMember ¶
type GithubCommandUpdateTeamRemoveMember struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateTeamRemoveMember) Apply ¶
func (g *GithubCommandUpdateTeamRemoveMember) Apply(ctx context.Context)
type GithubCommandUpdateTeamSetParent ¶ added in v0.8.0
type GithubCommandUpdateTeamSetParent struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateTeamSetParent) Apply ¶ added in v0.8.0
func (g *GithubCommandUpdateTeamSetParent) Apply(ctx context.Context)
type GithubCommandUpdateTeamUpdateMember ¶ added in v0.10.5
type GithubCommandUpdateTeamUpdateMember struct {
// contains filtered or unexported fields
}
func (*GithubCommandUpdateTeamUpdateMember) Apply ¶ added in v0.10.5
func (g *GithubCommandUpdateTeamUpdateMember) Apply(ctx context.Context)
type GithubWebhookServer ¶ added in v0.6.0
GithubWebhookServer is the interface for the webhook server It will wait for a Github webhook event and call the callback function when a merge event is received on the main branch
func NewGithubWebhookServerImpl ¶ added in v0.6.0
func NewGithubWebhookServerImpl(httpaddr string, httpport int, webhookPath string, secret string, mainBranch string, callback GithubWebhookServerCallback) GithubWebhookServer
type GithubWebhookServerCallback ¶ added in v0.6.0
type GithubWebhookServerCallback func()
type GithubWebhookServerImpl ¶ added in v0.6.0
type GithubWebhookServerImpl struct {
// contains filtered or unexported fields
}
func (*GithubWebhookServerImpl) Shutdown ¶ added in v0.6.0
func (s *GithubWebhookServerImpl) Shutdown() error
func (*GithubWebhookServerImpl) Start ¶ added in v0.6.0
func (s *GithubWebhookServerImpl) Start() error
func (*GithubWebhookServerImpl) WebhookHandler ¶ added in v0.6.0
func (s *GithubWebhookServerImpl) WebhookHandler(w http.ResponseWriter, r *http.Request)
type Goliac ¶
type Goliac interface { GoliacObservability // will run and apply the reconciliation, // it returns an error if something went wrong, and a detailed list of errors and warnings Apply(ctx context.Context, fs billy.Filesystem, dryrun bool, repositoryUrl, branch string) (error, []error, []entity.Warning, *engine.UnmanagedResources) // will clone run the user-plugin to sync users, and will commit to the team repository, return true if a change was done UsersUpdate(ctx context.Context, fs billy.Filesystem, repositoryUrl, branch string, dryrun bool, force bool) (bool, error) // flush remote cache FlushCache() GetLocal() engine.GoliacLocalResources }
* Goliac is the main interface of the application. * It is used to load and validate a goliac repository and apply it to github.
func NewGoliacImpl ¶
type GoliacImpl ¶
type GoliacImpl struct {
// contains filtered or unexported fields
}
func (*GoliacImpl) FlushCache ¶
func (g *GoliacImpl) FlushCache()
func (*GoliacImpl) GetLocal ¶ added in v0.2.0
func (g *GoliacImpl) GetLocal() engine.GoliacLocalResources
func (*GoliacImpl) SetRemoteObservability ¶ added in v0.11.0
func (g *GoliacImpl) SetRemoteObservability(feedback observability.RemoteObservability) error
func (*GoliacImpl) UsersUpdate ¶
type GoliacLight ¶ added in v0.2.0
* This "version" of Goliac is here just to validate a local * teams directory. It is mainly used for CI purpose when we need to validate * a PR
func NewGoliacLightImpl ¶ added in v0.2.0
func NewGoliacLightImpl() (GoliacLight, error)
type GoliacLightImpl ¶ added in v0.2.0
type GoliacLightImpl struct {
// contains filtered or unexported fields
}
func (*GoliacLightImpl) Validate ¶ added in v0.2.0
func (g *GoliacLightImpl) Validate(path string) error
type GoliacObservability ¶ added in v0.11.0
type GoliacObservability interface {
SetRemoteObservability(feedback observability.RemoteObservability) error // if you want to get feedback on the loading process
}
type GoliacServer ¶
type GoliacServer interface { Serve() GetLiveness(health.GetLivenessParams) middleware.Responder GetReadiness(health.GetReadinessParams) middleware.Responder PostFlushCache(app.PostFlushCacheParams) middleware.Responder PostResync(app.PostResyncParams) middleware.Responder GetStatus(app.GetStatusParams) middleware.Responder GetUsers(app.GetUsersParams) middleware.Responder GetUser(app.GetUserParams) middleware.Responder GetCollaborators(app.GetCollaboratorsParams) middleware.Responder GetCollaborator(app.GetCollaboratorParams) middleware.Responder GetTeams(app.GetTeamsParams) middleware.Responder GetTeam(app.GetTeamParams) middleware.Responder GetRepositories(app.GetRepositoriesParams) middleware.Responder GetRepository(app.GetRepositoryParams) middleware.Responder GetStatistics(app.GetStatiticsParams) middleware.Responder GetUnmanaged(app.GetUnmanagedParams) middleware.Responder }
* GoliacServer is here to run as a serve that * - sync/reconciliate periodically * - provide a REST API server
func NewGoliacServer ¶
func NewGoliacServer(goliac Goliac, notificationService notification.NotificationService) GoliacServer
type GoliacServerImpl ¶
type GoliacServerImpl struct {
// contains filtered or unexported fields
}
func (*GoliacServerImpl) GetCollaborator ¶ added in v0.2.2
func (g *GoliacServerImpl) GetCollaborator(params app.GetCollaboratorParams) middleware.Responder
func (*GoliacServerImpl) GetCollaborators ¶ added in v0.2.2
func (g *GoliacServerImpl) GetCollaborators(app.GetCollaboratorsParams) middleware.Responder
func (*GoliacServerImpl) GetLiveness ¶
func (g *GoliacServerImpl) GetLiveness(params health.GetLivenessParams) middleware.Responder
func (*GoliacServerImpl) GetReadiness ¶
func (g *GoliacServerImpl) GetReadiness(params health.GetReadinessParams) middleware.Responder
func (*GoliacServerImpl) GetRepositories ¶ added in v0.2.0
func (g *GoliacServerImpl) GetRepositories(app.GetRepositoriesParams) middleware.Responder
func (*GoliacServerImpl) GetRepository ¶ added in v0.2.0
func (g *GoliacServerImpl) GetRepository(params app.GetRepositoryParams) middleware.Responder
func (*GoliacServerImpl) GetStatistics ¶ added in v0.7.0
func (g *GoliacServerImpl) GetStatistics(app.GetStatiticsParams) middleware.Responder
func (*GoliacServerImpl) GetStatus ¶ added in v0.2.0
func (g *GoliacServerImpl) GetStatus(app.GetStatusParams) middleware.Responder
func (*GoliacServerImpl) GetTeam ¶ added in v0.2.0
func (g *GoliacServerImpl) GetTeam(params app.GetTeamParams) middleware.Responder
func (*GoliacServerImpl) GetTeams ¶ added in v0.2.0
func (g *GoliacServerImpl) GetTeams(app.GetTeamsParams) middleware.Responder
func (*GoliacServerImpl) GetUnmanaged ¶ added in v0.7.1
func (g *GoliacServerImpl) GetUnmanaged(app.GetUnmanagedParams) middleware.Responder
func (*GoliacServerImpl) GetUser ¶ added in v0.2.0
func (g *GoliacServerImpl) GetUser(params app.GetUserParams) middleware.Responder
func (*GoliacServerImpl) GetUsers ¶ added in v0.2.0
func (g *GoliacServerImpl) GetUsers(app.GetUsersParams) middleware.Responder
func (*GoliacServerImpl) PostFlushCache ¶ added in v0.2.0
func (g *GoliacServerImpl) PostFlushCache(app.PostFlushCacheParams) middleware.Responder
func (*GoliacServerImpl) PostResync ¶ added in v0.2.0
func (g *GoliacServerImpl) PostResync(app.PostResyncParams) middleware.Responder
func (*GoliacServerImpl) Serve ¶
func (g *GoliacServerImpl) Serve()
func (*GoliacServerImpl) StartRESTApi ¶
func (g *GoliacServerImpl) StartRESTApi() (*restapi.Server, error)
type LoadGithubSamlUsers ¶
type LoadGithubSamlUsers func(observability.RemoteObservability) (map[string]*entity.User, error)
type Scaffold ¶
type Scaffold struct {
// contains filtered or unexported fields
}
func NewScaffold ¶
func (*Scaffold) Generate ¶
* Generate will generate a full teams directory structure compatible with Goliac
func (*Scaffold) SetRemoteObservability ¶ added in v0.11.0
func (s *Scaffold) SetRemoteObservability(feedback observability.RemoteObservability) error