Version: v0.7.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ActionHandler

type ActionHandler struct {
	// contains filtered or unexported fields

func NewActionHandler

func NewActionHandler(log zerolog.Logger, readDB *readdb.ReadDB, dm *datamanager.DataManager, e *etcd.Store) *ActionHandler

func (*ActionHandler) AddOrgMember

func (h *ActionHandler) AddOrgMember(ctx context.Context, orgRef, userRef string, role types.MemberRole) (*types.OrganizationMember, error)

AddOrgMember add/updates an org member. TODO(sgotti) handle invitation when implemented

func (*ActionHandler) CreateOrg

func (*ActionHandler) CreateProject

func (h *ActionHandler) CreateProject(ctx context.Context, req *CreateUpdateProjectRequest) (*types.Project, error)

func (*ActionHandler) CreateProjectGroup

func (*ActionHandler) CreateRemoteSource

func (*ActionHandler) CreateSecret

func (h *ActionHandler) CreateSecret(ctx context.Context, req *CreateUpdateSecretRequest) (*types.Secret, error)

func (*ActionHandler) CreateUser

func (h *ActionHandler) CreateUser(ctx context.Context, req *CreateUserRequest) (*types.User, error)

func (*ActionHandler) CreateUserLA

func (h *ActionHandler) CreateUserLA(ctx context.Context, req *CreateUserLARequest) (*types.LinkedAccount, error)

func (*ActionHandler) CreateUserToken

func (h *ActionHandler) CreateUserToken(ctx context.Context, userRef, tokenName string) (string, error)

func (*ActionHandler) CreateVariable

func (h *ActionHandler) CreateVariable(ctx context.Context, req *CreateUpdateVariableRequest) (*types.Variable, error)

func (*ActionHandler) DeleteOrg

func (h *ActionHandler) DeleteOrg(ctx context.Context, orgRef string) error

func (*ActionHandler) DeleteProject

func (h *ActionHandler) DeleteProject(ctx context.Context, projectRef string) error

func (*ActionHandler) DeleteProjectGroup

func (h *ActionHandler) DeleteProjectGroup(ctx context.Context, projectGroupRef string) error

func (*ActionHandler) DeleteRemoteSource

func (h *ActionHandler) DeleteRemoteSource(ctx context.Context, remoteSourceName string) error

func (*ActionHandler) DeleteSecret

func (h *ActionHandler) DeleteSecret(ctx context.Context, parentType types.ConfigType, parentRef, secretName string) error

func (*ActionHandler) DeleteUser

func (h *ActionHandler) DeleteUser(ctx context.Context, userRef string) error

func (*ActionHandler) DeleteUserLA

func (h *ActionHandler) DeleteUserLA(ctx context.Context, userRef, laID string) error

func (*ActionHandler) DeleteUserToken

func (h *ActionHandler) DeleteUserToken(ctx context.Context, userRef, tokenName string) error

func (*ActionHandler) DeleteVariable

func (h *ActionHandler) DeleteVariable(ctx context.Context, parentType types.ConfigType, parentRef, variableName string) error

func (*ActionHandler) Export added in v0.2.0

func (h *ActionHandler) Export(ctx context.Context, w io.Writer) error

func (*ActionHandler) GetOrgMembers

func (h *ActionHandler) GetOrgMembers(ctx context.Context, orgRef string) ([]*OrgMemberResponse, error)

func (*ActionHandler) GetProject added in v0.3.0

func (h *ActionHandler) GetProject(ctx context.Context, projectRef string) (*types.Project, error)

func (*ActionHandler) GetProjectGroup added in v0.3.0

func (h *ActionHandler) GetProjectGroup(ctx context.Context, projectGroupRef string) (*types.ProjectGroup, error)

func (*ActionHandler) GetProjectGroupProjects

func (h *ActionHandler) GetProjectGroupProjects(ctx context.Context, projectGroupRef string) ([]*types.Project, error)

func (*ActionHandler) GetProjectGroupSubgroups

func (h *ActionHandler) GetProjectGroupSubgroups(ctx context.Context, projectGroupRef string) ([]*types.ProjectGroup, error)

func (*ActionHandler) GetSecret

func (h *ActionHandler) GetSecret(ctx context.Context, secretID string) (*types.Secret, error)

func (*ActionHandler) GetSecrets

func (h *ActionHandler) GetSecrets(ctx context.Context, parentType types.ConfigType, parentRef string, tree bool) ([]*types.Secret, error)

func (*ActionHandler) GetUserOrgs

func (h *ActionHandler) GetUserOrgs(ctx context.Context, userRef string) ([]*UserOrgsResponse, error)

func (*ActionHandler) GetVariables

func (h *ActionHandler) GetVariables(ctx context.Context, parentType types.ConfigType, parentRef string, tree bool) ([]*types.Variable, error)

func (*ActionHandler) Import added in v0.2.0

func (h *ActionHandler) Import(ctx context.Context, r io.Reader) error

func (*ActionHandler) MaintenanceMode added in v0.2.0

func (h *ActionHandler) MaintenanceMode(ctx context.Context, enable bool) error

func (*ActionHandler) RemoveOrgMember

func (h *ActionHandler) RemoveOrgMember(ctx context.Context, orgRef, userRef string) error

RemoveOrgMember removes an org member.

func (*ActionHandler) ResolveConfigID added in v0.7.0

func (h *ActionHandler) ResolveConfigID(tx *db.Tx, configType types.ConfigType, ref string) (string, error)

func (*ActionHandler) SetMaintenanceMode added in v0.2.0

func (h *ActionHandler) SetMaintenanceMode(maintenanceMode bool)

func (*ActionHandler) UpdateProject

func (h *ActionHandler) UpdateProject(ctx context.Context, curProjectRef string, req *CreateUpdateProjectRequest) (*types.Project, error)

func (*ActionHandler) UpdateProjectGroup

func (h *ActionHandler) UpdateProjectGroup(ctx context.Context, curProjectGroupRef string, req *CreateUpdateProjectGroupRequest) (*types.ProjectGroup, error)

func (*ActionHandler) UpdateRemoteSource

func (h *ActionHandler) UpdateRemoteSource(ctx context.Context, remoteSourceRef string, req *CreateUpdateRemoteSourceRequest) (*types.RemoteSource, error)

func (*ActionHandler) UpdateSecret

func (h *ActionHandler) UpdateSecret(ctx context.Context, curSecretName string, req *CreateUpdateSecretRequest) (*types.Secret, error)

func (*ActionHandler) UpdateUser

func (h *ActionHandler) UpdateUser(ctx context.Context, req *UpdateUserRequest) (*types.User, error)

func (*ActionHandler) UpdateUserLA

func (h *ActionHandler) UpdateUserLA(ctx context.Context, req *UpdateUserLARequest) (*types.LinkedAccount, error)

func (*ActionHandler) UpdateVariable

func (h *ActionHandler) UpdateVariable(ctx context.Context, curVariableName string, req *CreateUpdateVariableRequest) (*types.Variable, error)

func (*ActionHandler) ValidateProjectGroupReq added in v0.7.0

func (h *ActionHandler) ValidateProjectGroupReq(ctx context.Context, req *CreateUpdateProjectGroupRequest) error

func (*ActionHandler) ValidateProjectReq added in v0.7.0

func (h *ActionHandler) ValidateProjectReq(ctx context.Context, req *CreateUpdateProjectRequest) error

func (*ActionHandler) ValidateRemoteSourceReq added in v0.7.0

func (h *ActionHandler) ValidateRemoteSourceReq(ctx context.Context, req *CreateUpdateRemoteSourceRequest) error

func (*ActionHandler) ValidateSecretReq added in v0.7.0

func (h *ActionHandler) ValidateSecretReq(ctx context.Context, req *CreateUpdateSecretRequest) error

func (*ActionHandler) ValidateVariableReq added in v0.7.0

func (h *ActionHandler) ValidateVariableReq(ctx context.Context, req *CreateUpdateVariableRequest) error

type CreateOrgRequest added in v0.7.0

type CreateOrgRequest struct {
	Name          string
	Visibility    types.Visibility
	CreatorUserID string

type CreateUpdateProjectGroupRequest added in v0.7.0

type CreateUpdateProjectGroupRequest struct {
	Name       string
	Parent     types.Parent
	Visibility types.Visibility

type CreateUpdateProjectRequest added in v0.7.0

type CreateUpdateProjectRequest struct {
	Name                       string
	Parent                     types.Parent
	Visibility                 types.Visibility
	RemoteRepositoryConfigType types.RemoteRepositoryConfigType
	RemoteSourceID             string
	LinkedAccountID            string
	RepositoryID               string
	RepositoryPath             string
	SSHPrivateKey              string
	SkipSSHHostKeyCheck        bool
	PassVarsToForkedPR         bool

type CreateUpdateRemoteSourceRequest added in v0.7.0

type CreateUpdateRemoteSourceRequest struct {
	Name                string
	APIURL              string
	SkipVerify          bool
	Type                types.RemoteSourceType
	AuthType            types.RemoteSourceAuthType
	Oauth2ClientID      string
	Oauth2ClientSecret  string
	SSHHostKey          string
	SkipSSHHostKeyCheck bool
	RegistrationEnabled *bool
	LoginEnabled        *bool

type CreateUpdateSecretRequest added in v0.7.0

type CreateUpdateSecretRequest struct {
	Name             string
	Parent           types.Parent
	Type             types.SecretType
	Data             map[string]string
	SecretProviderID string
	Path             string

type CreateUpdateVariableRequest added in v0.7.0

type CreateUpdateVariableRequest struct {
	Name   string
	Parent types.Parent
	Values []types.VariableValue

type CreateUserLARequest

type CreateUserLARequest struct {
	UserRef string

	RemoteSourceName           string
	RemoteUserID               string
	RemoteUserName             string
	UserAccessToken            string
	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time

type CreateUserRequest

type CreateUserRequest struct {
	UserName string

	CreateUserLARequest *CreateUserLARequest

type OrgMemberResponse

type OrgMemberResponse struct {
	User *types.User
	Role types.MemberRole

type UpdateProjectGroupRequest

type UpdateProjectGroupRequest struct {
	ProjectGroupRef string

	ProjectGroup *types.ProjectGroup

type UpdateUserLARequest

type UpdateUserLARequest struct {
	UserRef string

	LinkedAccountID            string
	RemoteUserID               string
	RemoteUserName             string
	UserAccessToken            string
	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time

type UpdateUserRequest

type UpdateUserRequest struct {
	UserRef string

	UserName string

type UserOrgsResponse

type UserOrgsResponse struct {
	Organization *types.Organization
	Role         types.MemberRole

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL