Documentation ¶
Index ¶
- Constants
- Variables
- func MarshalCursor(c any) (string, error)
- func UnmarshalCursor(cs string, c any) error
- type ActionHandler
- func (h *ActionHandler) AddOrgMember(ctx context.Context, orgRef, userRef string, role cstypes.MemberRole) (*AddOrgMemberResponse, error)
- func (h *ActionHandler) Authorize(ctx context.Context, req *AuthorizeRequest) (*AuthorizeResponse, error)
- func (h *ActionHandler) CanAuthUserDoRunActions(ctx context.Context, groupType scommon.GroupType, ref string, ...) (bool, string, error)
- func (h *ActionHandler) CanAuthUserGetRun(ctx context.Context, groupType scommon.GroupType, ref string) (bool, string, error)
- func (h *ActionHandler) CreateOrg(ctx context.Context, req *CreateOrgRequest) (*cstypes.Organization, error)
- func (h *ActionHandler) CreateOrgInvitation(ctx context.Context, req *CreateOrgInvitationRequest) (*OrgInvitationResponse, error)
- func (h *ActionHandler) CreateProject(ctx context.Context, req *CreateProjectRequest) (*csapitypes.Project, error)
- func (h *ActionHandler) CreateProjectGroup(ctx context.Context, req *CreateProjectGroupRequest) (*csapitypes.ProjectGroup, error)
- func (h *ActionHandler) CreateRemoteSource(ctx context.Context, req *CreateRemoteSourceRequest) (*cstypes.RemoteSource, error)
- func (h *ActionHandler) CreateRuns(ctx context.Context, req *CreateRunRequest) error
- func (h *ActionHandler) CreateSecret(ctx context.Context, req *CreateSecretRequest) (*csapitypes.Secret, error)
- func (h *ActionHandler) CreateUser(ctx context.Context, req *CreateUserRequest) (*cstypes.User, error)
- func (h *ActionHandler) CreateUserLA(ctx context.Context, req *CreateUserLARequest) (*cstypes.LinkedAccount, error)
- func (h *ActionHandler) CreateUserToken(ctx context.Context, req *CreateUserTokenRequest) (string, error)
- func (h *ActionHandler) CreateVariable(ctx context.Context, req *CreateVariableRequest) (*csapitypes.Variable, []*csapitypes.Secret, error)
- func (h *ActionHandler) DeleteLogs(ctx context.Context, req *DeleteLogsRequest) error
- func (h *ActionHandler) DeleteOrg(ctx context.Context, orgRef string) error
- func (h *ActionHandler) DeleteOrgInvitation(ctx context.Context, orgRef string, userRef string) error
- func (h *ActionHandler) DeleteProject(ctx context.Context, projectRef string) error
- func (h *ActionHandler) DeleteProjectGroup(ctx context.Context, projectRef string) error
- func (h *ActionHandler) DeleteRemoteSource(ctx context.Context, rsRef string) error
- func (h *ActionHandler) DeleteSecret(ctx context.Context, parentType cstypes.ObjectKind, parentRef, name string) error
- func (h *ActionHandler) DeleteUser(ctx context.Context, userRef string) error
- func (h *ActionHandler) DeleteUserLA(ctx context.Context, userRef, laID string) error
- func (h *ActionHandler) DeleteUserToken(ctx context.Context, userRef, tokenName string) error
- func (h *ActionHandler) DeleteVariable(ctx context.Context, parentType cstypes.ObjectKind, parentRef, name string) error
- func (h *ActionHandler) Export(ctx context.Context, serviceName string) (*http.Response, error)
- func (h *ActionHandler) GetBadge(ctx context.Context, projectRef, branch string) (string, error)
- func (h *ActionHandler) GetCurrentUser(ctx context.Context, userRef string) (*PrivateUserResponse, error)
- func (h *ActionHandler) GetGitSource(ctx context.Context, rs *cstypes.RemoteSource, userName string, ...) (gitsource.GitSource, error)
- func (h *ActionHandler) GetGroupRuns(ctx context.Context, req *GetGroupRunsRequest) (*GetGroupRunsResponse, error)
- func (h *ActionHandler) GetLogs(ctx context.Context, req *GetLogsRequest) (*http.Response, error)
- func (h *ActionHandler) GetOrg(ctx context.Context, orgRef string) (*cstypes.Organization, error)
- func (h *ActionHandler) GetOrgInvitation(ctx context.Context, orgRef string, userRef string) (*OrgInvitationResponse, error)
- func (h *ActionHandler) GetOrgInvitations(ctx context.Context, orgRef string, limit int) ([]*cstypes.OrgInvitation, error)
- func (h *ActionHandler) GetOrgMembers(ctx context.Context, req *GetOrgMembersRequest) (*GetOrgMembersResponse, error)
- func (h *ActionHandler) GetOrgs(ctx context.Context, req *GetOrgsRequest) (*GetOrgsResponse, error)
- func (h *ActionHandler) GetProject(ctx context.Context, projectRef string) (*csapitypes.Project, error)
- func (h *ActionHandler) GetProjectCommitStatusDeliveries(ctx context.Context, req *GetProjectCommitStatusDeliveriesRequest) (*GetProjectCommitStatusDeliveriesResponse, error)
- func (h *ActionHandler) GetProjectGroup(ctx context.Context, projectGroupRef string) (*csapitypes.ProjectGroup, error)
- func (h *ActionHandler) GetProjectGroupProjects(ctx context.Context, projectGroupRef string) ([]*csapitypes.Project, error)
- func (h *ActionHandler) GetProjectGroupSubgroups(ctx context.Context, projectGroupRef string) ([]*csapitypes.ProjectGroup, error)
- func (h *ActionHandler) GetProjectRunWebhookDeliveries(ctx context.Context, req *GetProjectRunWebhookDeliveriesRequest) (*GetProjectRunWebhookDeliveriesResponse, error)
- func (h *ActionHandler) GetRemoteSource(ctx context.Context, rsRef string) (*cstypes.RemoteSource, error)
- func (h *ActionHandler) GetRemoteSources(ctx context.Context, req *GetRemoteSourcesRequest) (*GetRemoteSourcesResponse, error)
- func (h *ActionHandler) GetRun(ctx context.Context, groupType scommon.GroupType, ref string, runNumber uint64) (*rsapitypes.RunResponse, error)
- func (h *ActionHandler) GetSecrets(ctx context.Context, req *GetSecretsRequest) ([]*csapitypes.Secret, error)
- func (h *ActionHandler) GetUser(ctx context.Context, userRef string) (*cstypes.User, error)
- func (h *ActionHandler) GetUserByLinkedAccountRemoteUserAndSource(ctx context.Context, remoteUserID string, remoteSourceRef string) (*PrivateUserResponse, error)
- func (h *ActionHandler) GetUserGitSource(ctx context.Context, remoteSourceRef, userRef string) (gitsource.GitSource, *cstypes.RemoteSource, *cstypes.LinkedAccount, error)
- func (h *ActionHandler) GetUserOrgInvitations(ctx context.Context, userRef string, limit int) ([]*OrgInvitationResponse, error)
- func (h *ActionHandler) GetUserOrgs(ctx context.Context, req *GetUserOrgsRequest) (*GetUserOrgsResponse, error)
- func (h *ActionHandler) GetUsers(ctx context.Context, req *GetUsersRequest) (*GetUsersResponse, error)
- func (h *ActionHandler) GetVariables(ctx context.Context, req *GetVariablesRequest) ([]*csapitypes.Variable, []*csapitypes.Secret, error)
- func (h *ActionHandler) GetVersion(ctx context.Context) (*gwapitypes.VersionResponse, error)
- func (h *ActionHandler) HandleOauth2Callback(ctx context.Context, code, state string) (*RemoteSourceAuthResult, error)
- func (h *ActionHandler) HandleRemoteSourceAuth(ctx context.Context, remoteSourceName, remoteUsername, remotePassword string, ...) (*RemoteSourceAuthResponse, error)
- func (h *ActionHandler) HandleRemoteSourceAuthRequest(ctx context.Context, requestType RemoteSourceRequestType, requestString string, ...) (*RemoteSourceAuthResult, error)
- func (h *ActionHandler) Import(ctx context.Context, r io.Reader, serviceName string) error
- func (h *ActionHandler) IsAuthUserMember(ctx context.Context, ownerType cstypes.ObjectKind, ownerID string) (bool, error)
- func (h *ActionHandler) IsAuthUserOrgOwner(ctx context.Context, orgID string) (bool, error)
- func (h *ActionHandler) IsAuthUserProjectOwner(ctx context.Context, ownerType cstypes.ObjectKind, ownerID string) (bool, error)
- func (h *ActionHandler) IsAuthUserVariableOwner(ctx context.Context, parentType cstypes.ObjectKind, parentRef string) (bool, error)
- func (h *ActionHandler) IsMaintenanceEnabled(ctx context.Context, serviceName string) (*MaintenanceStatusResponse, error)
- func (h *ActionHandler) IsUserOrgMember(ctx context.Context, userRef, orgRef string) (bool, error)
- func (h *ActionHandler) LoginUser(ctx context.Context, req *LoginUserRequest) (*LoginUserResponse, error)
- func (h *ActionHandler) MaintenanceMode(ctx context.Context, serviceName string, enable bool) error
- func (h *ActionHandler) OrgInvitationAction(ctx context.Context, req *OrgInvitationActionRequest) error
- func (h *ActionHandler) ProjectCommitStatusRedelivery(ctx context.Context, req *ProjectCommitStatusRedeliveryRequest) error
- func (h *ActionHandler) ProjectCreateRun(ctx context.Context, projectRef, branch, tag, refName, commitSHA string) error
- func (h *ActionHandler) ProjectRunWebhookRedelivery(ctx context.Context, req *ProjectRunWebhookRedeliveryRequest) error
- func (h *ActionHandler) ProjectUpdateRepoLinkedAccount(ctx context.Context, projectRef string) (*csapitypes.Project, error)
- func (h *ActionHandler) ReconfigProject(ctx context.Context, projectRef string) error
- func (h *ActionHandler) RefreshLinkedAccount(ctx context.Context, rs *cstypes.RemoteSource, userName string, ...) (*cstypes.LinkedAccount, error)
- func (h *ActionHandler) RefreshRemoteRepositoryInfo(ctx context.Context, projectRef string) (*csapitypes.Project, error)
- func (h *ActionHandler) RegisterUser(ctx context.Context, req *RegisterUserRequest) (*cstypes.User, error)
- func (h *ActionHandler) RemoveOrgMember(ctx context.Context, orgRef, userRef string) error
- func (h *ActionHandler) RunAction(ctx context.Context, req *RunActionsRequest) (*rsapitypes.RunResponse, error)
- func (h *ActionHandler) RunTaskAction(ctx context.Context, req *RunTaskActionsRequest) error
- func (h *ActionHandler) UpdateOrg(ctx context.Context, orgRef string, req *UpdateOrgRequest) (*cstypes.Organization, error)
- func (h *ActionHandler) UpdateProject(ctx context.Context, projectRef string, req *UpdateProjectRequest) (*csapitypes.Project, error)
- func (h *ActionHandler) UpdateProjectGroup(ctx context.Context, projectGroupRef string, req *UpdateProjectGroupRequest) (*csapitypes.ProjectGroup, error)
- func (h *ActionHandler) UpdateRemoteSource(ctx context.Context, req *UpdateRemoteSourceRequest) (*cstypes.RemoteSource, error)
- func (h *ActionHandler) UpdateSecret(ctx context.Context, req *UpdateSecretRequest) (*csapitypes.Secret, error)
- func (h *ActionHandler) UpdateUserLA(ctx context.Context, userRef string, la *cstypes.LinkedAccount) error
- func (h *ActionHandler) UpdateVariable(ctx context.Context, req *UpdateVariableRequest) (*csapitypes.Variable, []*csapitypes.Secret, error)
- func (h *ActionHandler) UserCreateRun(ctx context.Context, req *UserCreateRunRequest) error
- type AddOrgMemberResponse
- type AuthorizeRequest
- type AuthorizeResponse
- type CreateOrgInvitationRequest
- type CreateOrgRequest
- type CreateProjectGroupRequest
- type CreateProjectRequest
- type CreateRemoteSourceRequest
- type CreateRunRequest
- type CreateSecretRequest
- type CreateUserLARequest
- type CreateUserLAResponse
- type CreateUserRequest
- type CreateUserTokenRequest
- type CreateVariableRequest
- type DeleteLogsRequest
- type DeliveryCursor
- type GetGroupRunsRequest
- type GetGroupRunsResponse
- type GetLogsRequest
- type GetOrgMembersRequest
- type GetOrgMembersResponse
- type GetOrgsRequest
- type GetOrgsResponse
- type GetProjectCommitStatusDeliveriesRequest
- type GetProjectCommitStatusDeliveriesResponse
- type GetProjectRunWebhookDeliveriesRequest
- type GetProjectRunWebhookDeliveriesResponse
- type GetRemoteSourcesRequest
- type GetRemoteSourcesResponse
- type GetSecretsRequest
- type GetUserOrgsRequest
- type GetUserOrgsResponse
- type GetUsersRequest
- type GetUsersResponse
- type GetVariablesRequest
- type GroupRunsCursor
- type LoginUserRequest
- type LoginUserResponse
- type MaintenanceStatusResponse
- type OrgInvitationActionRequest
- type OrgInvitationResponse
- type OrgMemberResponse
- type OrganizationMemberAddingMode
- type PrivateUserResponse
- type ProjectCommitStatusRedeliveryRequest
- type ProjectRunWebhookRedeliveryRequest
- type RegisterUserRequest
- type RemoteSourceAuthResponse
- type RemoteSourceAuthResult
- type RemoteSourceRequestType
- type RunActionType
- type RunActionsRequest
- type RunTaskActionType
- type RunTaskActionsRequest
- type SortDirection
- type StartCursor
- type UpdateOrgRequest
- type UpdateProjectGroupRequest
- type UpdateProjectRequest
- type UpdateRemoteSourceRequest
- type UpdateSecretRequest
- type UpdateVariableRequest
- type UserCreateRunRequest
Constants ¶
View Source
const ( ConfigstoreService = "configstore" RunserviceService = "runservice" )
View Source
const ( // List of runs annotations AnnotationRunType = "run_type" AnnotationRefType = "ref_type" AnnotationProjectID = "projectid" AnnotationUserID = "userid" AnnotationRunCreationTrigger = "run_creation_trigger" AnnotationWebhookEvent = "webhook_event" AnnotationWebhookSender = "webhook_sender" AnnotationCommitSHA = "commit_sha" AnnotationRef = "ref" AnnotationMessage = "message" AnnotationCommitLink = "commit_link" AnnotationCompareLink = "compare_link" AnnotationBranch = "branch" AnnotationBranchLink = "branch_link" AnnotationTag = "tag" AnnotationTagLink = "tag_link" AnnotationPullRequestID = "pull_request_id" AnnotationPullRequestLink = "pull_request_link" )
Variables ¶
View Source
var (
SkipRunMessage = regexp.MustCompile(`.*\[ci skip\].*`)
)
Functions ¶
func MarshalCursor ¶ added in v0.9.0
func UnmarshalCursor ¶ added in v0.9.0
Types ¶
type ActionHandler ¶
type ActionHandler struct {
// contains filtered or unexported fields
}
func NewActionHandler ¶
func NewActionHandler(log zerolog.Logger, sd *scommon.TokenSigningData, sc *scommon.CookieSigningData, configstoreClient *csclient.Client, runserviceClient *rsclient.Client, notificationClient *nsclient.Client, agolaID, apiExposedURL, webExposedURL string, unsecureCookies bool, organizationMemberAddingMode OrganizationMemberAddingMode) *ActionHandler
func (*ActionHandler) AddOrgMember ¶
func (h *ActionHandler) AddOrgMember(ctx context.Context, orgRef, userRef string, role cstypes.MemberRole) (*AddOrgMemberResponse, error)
func (*ActionHandler) Authorize ¶
func (h *ActionHandler) Authorize(ctx context.Context, req *AuthorizeRequest) (*AuthorizeResponse, error)
func (*ActionHandler) CanAuthUserDoRunActions ¶ added in v0.9.0
func (*ActionHandler) CanAuthUserGetRun ¶ added in v0.9.0
func (*ActionHandler) CreateOrg ¶
func (h *ActionHandler) CreateOrg(ctx context.Context, req *CreateOrgRequest) (*cstypes.Organization, error)
func (*ActionHandler) CreateOrgInvitation ¶ added in v0.8.0
func (h *ActionHandler) CreateOrgInvitation(ctx context.Context, req *CreateOrgInvitationRequest) (*OrgInvitationResponse, error)
func (*ActionHandler) CreateProject ¶
func (h *ActionHandler) CreateProject(ctx context.Context, req *CreateProjectRequest) (*csapitypes.Project, error)
func (*ActionHandler) CreateProjectGroup ¶
func (h *ActionHandler) CreateProjectGroup(ctx context.Context, req *CreateProjectGroupRequest) (*csapitypes.ProjectGroup, error)
func (*ActionHandler) CreateRemoteSource ¶
func (h *ActionHandler) CreateRemoteSource(ctx context.Context, req *CreateRemoteSourceRequest) (*cstypes.RemoteSource, error)
func (*ActionHandler) CreateRuns ¶
func (h *ActionHandler) CreateRuns(ctx context.Context, req *CreateRunRequest) error
func (*ActionHandler) CreateSecret ¶
func (h *ActionHandler) CreateSecret(ctx context.Context, req *CreateSecretRequest) (*csapitypes.Secret, error)
func (*ActionHandler) CreateUser ¶
func (h *ActionHandler) CreateUser(ctx context.Context, req *CreateUserRequest) (*cstypes.User, error)
func (*ActionHandler) CreateUserLA ¶
func (h *ActionHandler) CreateUserLA(ctx context.Context, req *CreateUserLARequest) (*cstypes.LinkedAccount, error)
func (*ActionHandler) CreateUserToken ¶
func (h *ActionHandler) CreateUserToken(ctx context.Context, req *CreateUserTokenRequest) (string, error)
func (*ActionHandler) CreateVariable ¶
func (h *ActionHandler) CreateVariable(ctx context.Context, req *CreateVariableRequest) (*csapitypes.Variable, []*csapitypes.Secret, error)
func (*ActionHandler) DeleteLogs ¶ added in v0.4.0
func (h *ActionHandler) DeleteLogs(ctx context.Context, req *DeleteLogsRequest) error
func (*ActionHandler) DeleteOrg ¶
func (h *ActionHandler) DeleteOrg(ctx context.Context, orgRef string) error
func (*ActionHandler) DeleteOrgInvitation ¶ added in v0.8.0
func (*ActionHandler) DeleteProject ¶
func (h *ActionHandler) DeleteProject(ctx context.Context, projectRef string) error
func (*ActionHandler) DeleteProjectGroup ¶
func (h *ActionHandler) DeleteProjectGroup(ctx context.Context, projectRef string) error
func (*ActionHandler) DeleteRemoteSource ¶
func (h *ActionHandler) DeleteRemoteSource(ctx context.Context, rsRef string) error
func (*ActionHandler) DeleteSecret ¶
func (h *ActionHandler) DeleteSecret(ctx context.Context, parentType cstypes.ObjectKind, parentRef, name 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 cstypes.ObjectKind, parentRef, name string) error
func (*ActionHandler) GetBadge ¶
GetBadge return a badge for a project branch TODO(sgotti) also handle tags and PRs
func (*ActionHandler) GetCurrentUser ¶ added in v0.8.0
func (h *ActionHandler) GetCurrentUser(ctx context.Context, userRef string) (*PrivateUserResponse, error)
func (*ActionHandler) GetGitSource ¶
func (h *ActionHandler) GetGitSource(ctx context.Context, rs *cstypes.RemoteSource, userName string, la *cstypes.LinkedAccount) (gitsource.GitSource, error)
GetGitSource is a wrapper around common.GetGitSource that will also refresh the oauth2 access token and update the linked account when needed
func (*ActionHandler) GetGroupRuns ¶ added in v0.9.0
func (h *ActionHandler) GetGroupRuns(ctx context.Context, req *GetGroupRunsRequest) (*GetGroupRunsResponse, error)
func (*ActionHandler) GetLogs ¶
func (h *ActionHandler) GetLogs(ctx context.Context, req *GetLogsRequest) (*http.Response, error)
func (*ActionHandler) GetOrg ¶
func (h *ActionHandler) GetOrg(ctx context.Context, orgRef string) (*cstypes.Organization, error)
func (*ActionHandler) GetOrgInvitation ¶ added in v0.8.0
func (h *ActionHandler) GetOrgInvitation(ctx context.Context, orgRef string, userRef string) (*OrgInvitationResponse, error)
func (*ActionHandler) GetOrgInvitations ¶ added in v0.8.0
func (h *ActionHandler) GetOrgInvitations(ctx context.Context, orgRef string, limit int) ([]*cstypes.OrgInvitation, error)
func (*ActionHandler) GetOrgMembers ¶
func (h *ActionHandler) GetOrgMembers(ctx context.Context, req *GetOrgMembersRequest) (*GetOrgMembersResponse, error)
func (*ActionHandler) GetOrgs ¶
func (h *ActionHandler) GetOrgs(ctx context.Context, req *GetOrgsRequest) (*GetOrgsResponse, error)
func (*ActionHandler) GetProject ¶
func (h *ActionHandler) GetProject(ctx context.Context, projectRef string) (*csapitypes.Project, error)
func (*ActionHandler) GetProjectCommitStatusDeliveries ¶ added in v0.9.0
func (h *ActionHandler) GetProjectCommitStatusDeliveries(ctx context.Context, req *GetProjectCommitStatusDeliveriesRequest) (*GetProjectCommitStatusDeliveriesResponse, error)
func (*ActionHandler) GetProjectGroup ¶
func (h *ActionHandler) GetProjectGroup(ctx context.Context, projectGroupRef string) (*csapitypes.ProjectGroup, error)
func (*ActionHandler) GetProjectGroupProjects ¶
func (h *ActionHandler) GetProjectGroupProjects(ctx context.Context, projectGroupRef string) ([]*csapitypes.Project, error)
func (*ActionHandler) GetProjectGroupSubgroups ¶
func (h *ActionHandler) GetProjectGroupSubgroups(ctx context.Context, projectGroupRef string) ([]*csapitypes.ProjectGroup, error)
func (*ActionHandler) GetProjectRunWebhookDeliveries ¶ added in v0.9.0
func (h *ActionHandler) GetProjectRunWebhookDeliveries(ctx context.Context, req *GetProjectRunWebhookDeliveriesRequest) (*GetProjectRunWebhookDeliveriesResponse, error)
func (*ActionHandler) GetRemoteSource ¶
func (h *ActionHandler) GetRemoteSource(ctx context.Context, rsRef string) (*cstypes.RemoteSource, error)
func (*ActionHandler) GetRemoteSources ¶
func (h *ActionHandler) GetRemoteSources(ctx context.Context, req *GetRemoteSourcesRequest) (*GetRemoteSourcesResponse, error)
func (*ActionHandler) GetRun ¶
func (h *ActionHandler) GetRun(ctx context.Context, groupType scommon.GroupType, ref string, runNumber uint64) (*rsapitypes.RunResponse, error)
func (*ActionHandler) GetSecrets ¶
func (h *ActionHandler) GetSecrets(ctx context.Context, req *GetSecretsRequest) ([]*csapitypes.Secret, error)
func (*ActionHandler) GetUserByLinkedAccountRemoteUserAndSource ¶ added in v0.8.0
func (h *ActionHandler) GetUserByLinkedAccountRemoteUserAndSource(ctx context.Context, remoteUserID string, remoteSourceRef string) (*PrivateUserResponse, error)
func (*ActionHandler) GetUserGitSource ¶ added in v0.8.0
func (h *ActionHandler) GetUserGitSource(ctx context.Context, remoteSourceRef, userRef string) (gitsource.GitSource, *cstypes.RemoteSource, *cstypes.LinkedAccount, error)
func (*ActionHandler) GetUserOrgInvitations ¶ added in v0.8.0
func (h *ActionHandler) GetUserOrgInvitations(ctx context.Context, userRef string, limit int) ([]*OrgInvitationResponse, error)
func (*ActionHandler) GetUserOrgs ¶ added in v0.7.0
func (h *ActionHandler) GetUserOrgs(ctx context.Context, req *GetUserOrgsRequest) (*GetUserOrgsResponse, error)
func (*ActionHandler) GetUsers ¶
func (h *ActionHandler) GetUsers(ctx context.Context, req *GetUsersRequest) (*GetUsersResponse, error)
func (*ActionHandler) GetVariables ¶
func (h *ActionHandler) GetVariables(ctx context.Context, req *GetVariablesRequest) ([]*csapitypes.Variable, []*csapitypes.Secret, error)
func (*ActionHandler) GetVersion ¶ added in v0.3.0
func (h *ActionHandler) GetVersion(ctx context.Context) (*gwapitypes.VersionResponse, error)
func (*ActionHandler) HandleOauth2Callback ¶
func (h *ActionHandler) HandleOauth2Callback(ctx context.Context, code, state string) (*RemoteSourceAuthResult, error)
func (*ActionHandler) HandleRemoteSourceAuth ¶
func (h *ActionHandler) HandleRemoteSourceAuth(ctx context.Context, remoteSourceName, remoteUsername, remotePassword string, requestType RemoteSourceRequestType, req interface{}) (*RemoteSourceAuthResponse, error)
func (*ActionHandler) HandleRemoteSourceAuthRequest ¶
func (h *ActionHandler) HandleRemoteSourceAuthRequest(ctx context.Context, requestType RemoteSourceRequestType, requestString string, remoteUserName, remotePassword, oauth2AccessToken, oauth2RefreshToken string, oauth2AccessTokenExpiresAt time.Time) (*RemoteSourceAuthResult, error)
func (*ActionHandler) IsAuthUserMember ¶ added in v0.9.0
func (h *ActionHandler) IsAuthUserMember(ctx context.Context, ownerType cstypes.ObjectKind, ownerID string) (bool, error)
func (*ActionHandler) IsAuthUserOrgOwner ¶ added in v0.9.0
func (*ActionHandler) IsAuthUserProjectOwner ¶ added in v0.9.0
func (h *ActionHandler) IsAuthUserProjectOwner(ctx context.Context, ownerType cstypes.ObjectKind, ownerID string) (bool, error)
func (*ActionHandler) IsAuthUserVariableOwner ¶ added in v0.9.0
func (h *ActionHandler) IsAuthUserVariableOwner(ctx context.Context, parentType cstypes.ObjectKind, parentRef string) (bool, error)
func (*ActionHandler) IsMaintenanceEnabled ¶ added in v0.8.0
func (h *ActionHandler) IsMaintenanceEnabled(ctx context.Context, serviceName string) (*MaintenanceStatusResponse, error)
func (*ActionHandler) IsUserOrgMember ¶ added in v0.9.0
func (*ActionHandler) LoginUser ¶
func (h *ActionHandler) LoginUser(ctx context.Context, req *LoginUserRequest) (*LoginUserResponse, error)
func (*ActionHandler) MaintenanceMode ¶ added in v0.8.0
func (*ActionHandler) OrgInvitationAction ¶ added in v0.8.0
func (h *ActionHandler) OrgInvitationAction(ctx context.Context, req *OrgInvitationActionRequest) error
func (*ActionHandler) ProjectCommitStatusRedelivery ¶ added in v0.9.0
func (h *ActionHandler) ProjectCommitStatusRedelivery(ctx context.Context, req *ProjectCommitStatusRedeliveryRequest) error
func (*ActionHandler) ProjectCreateRun ¶
func (h *ActionHandler) ProjectCreateRun(ctx context.Context, projectRef, branch, tag, refName, commitSHA string) error
func (*ActionHandler) ProjectRunWebhookRedelivery ¶ added in v0.9.0
func (h *ActionHandler) ProjectRunWebhookRedelivery(ctx context.Context, req *ProjectRunWebhookRedeliveryRequest) error
func (*ActionHandler) ProjectUpdateRepoLinkedAccount ¶
func (h *ActionHandler) ProjectUpdateRepoLinkedAccount(ctx context.Context, projectRef string) (*csapitypes.Project, error)
func (*ActionHandler) ReconfigProject ¶
func (h *ActionHandler) ReconfigProject(ctx context.Context, projectRef string) error
func (*ActionHandler) RefreshLinkedAccount ¶
func (h *ActionHandler) RefreshLinkedAccount(ctx context.Context, rs *cstypes.RemoteSource, userName string, la *cstypes.LinkedAccount) (*cstypes.LinkedAccount, error)
RefreshLinkedAccount refreshed the linked account oauth2 access token and update linked account in the configstore
func (*ActionHandler) RefreshRemoteRepositoryInfo ¶ added in v0.8.0
func (h *ActionHandler) RefreshRemoteRepositoryInfo(ctx context.Context, projectRef string) (*csapitypes.Project, error)
func (*ActionHandler) RegisterUser ¶
func (h *ActionHandler) RegisterUser(ctx context.Context, req *RegisterUserRequest) (*cstypes.User, error)
func (*ActionHandler) RemoveOrgMember ¶
func (h *ActionHandler) RemoveOrgMember(ctx context.Context, orgRef, userRef string) error
func (*ActionHandler) RunAction ¶
func (h *ActionHandler) RunAction(ctx context.Context, req *RunActionsRequest) (*rsapitypes.RunResponse, error)
func (*ActionHandler) RunTaskAction ¶
func (h *ActionHandler) RunTaskAction(ctx context.Context, req *RunTaskActionsRequest) error
func (*ActionHandler) UpdateOrg ¶ added in v0.8.0
func (h *ActionHandler) UpdateOrg(ctx context.Context, orgRef string, req *UpdateOrgRequest) (*cstypes.Organization, error)
func (*ActionHandler) UpdateProject ¶
func (h *ActionHandler) UpdateProject(ctx context.Context, projectRef string, req *UpdateProjectRequest) (*csapitypes.Project, error)
func (*ActionHandler) UpdateProjectGroup ¶
func (h *ActionHandler) UpdateProjectGroup(ctx context.Context, projectGroupRef string, req *UpdateProjectGroupRequest) (*csapitypes.ProjectGroup, error)
func (*ActionHandler) UpdateRemoteSource ¶
func (h *ActionHandler) UpdateRemoteSource(ctx context.Context, req *UpdateRemoteSourceRequest) (*cstypes.RemoteSource, error)
func (*ActionHandler) UpdateSecret ¶
func (h *ActionHandler) UpdateSecret(ctx context.Context, req *UpdateSecretRequest) (*csapitypes.Secret, error)
func (*ActionHandler) UpdateUserLA ¶
func (h *ActionHandler) UpdateUserLA(ctx context.Context, userRef string, la *cstypes.LinkedAccount) error
func (*ActionHandler) UpdateVariable ¶
func (h *ActionHandler) UpdateVariable(ctx context.Context, req *UpdateVariableRequest) (*csapitypes.Variable, []*csapitypes.Secret, error)
func (*ActionHandler) UserCreateRun ¶
func (h *ActionHandler) UserCreateRun(ctx context.Context, req *UserCreateRunRequest) error
type AddOrgMemberResponse ¶
type AddOrgMemberResponse struct { OrganizationMember *cstypes.OrganizationMember Org *cstypes.Organization User *cstypes.User }
type AuthorizeRequest ¶
type AuthorizeResponse ¶
type CreateOrgInvitationRequest ¶ added in v0.8.0
type CreateOrgInvitationRequest struct { UserRef string OrganizationRef string Role cstypes.MemberRole }
type CreateOrgRequest ¶
type CreateOrgRequest struct { Name string Visibility cstypes.Visibility CreatorUserID string }
type CreateProjectGroupRequest ¶
type CreateProjectGroupRequest struct { CurrentUserID string Name string ParentRef string Visibility cstypes.Visibility }
type CreateProjectRequest ¶
type CreateRunRequest ¶
type CreateRunRequest struct { RunType itypes.RunType RefType itypes.RunRefType RunCreationTrigger itypes.RunCreationTriggerType Project *cstypes.Project User *cstypes.User RepoPath string GitSource gitsource.GitSource CommitSHA string Message string Branch string Tag string Ref string PullRequestID string PRFromSameRepo bool SSHPrivKey string SSHHostKey string SkipSSHHostKeyCheck bool CloneURL string WebhookEvent string WebhookSender string CommitLink string BranchLink string TagLink string PullRequestLink string // CompareLink is provided only when triggered by a webhook and contains the // commit compare link CompareLink string // fields only used with user direct runs UserRunRepoUUID string Variables map[string]string }
type CreateSecretRequest ¶
type CreateSecretRequest struct { Name string ParentType cstypes.ObjectKind ParentRef string Type cstypes.SecretType // internal secret Data map[string]string // external secret SecretProviderID string Path string }
type CreateUserLARequest ¶
type CreateUserLAResponse ¶
type CreateUserLAResponse struct {
LinkedAccount *cstypes.LinkedAccount
}
type CreateUserRequest ¶
type CreateUserRequest struct {
UserName string
}
type CreateUserTokenRequest ¶
type CreateVariableRequest ¶
type CreateVariableRequest struct { Name string ParentType cstypes.ObjectKind ParentRef string Values []cstypes.VariableValue }
type DeleteLogsRequest ¶ added in v0.4.0
type DeliveryCursor ¶ added in v0.9.0
type DeliveryCursor struct { StartSequence uint64 SortDirection SortDirection DeliveryStatusFilter []string }
type GetGroupRunsRequest ¶ added in v0.9.0
type GetGroupRunsResponse ¶ added in v0.9.0
type GetLogsRequest ¶
type GetOrgMembersRequest ¶ added in v0.9.0
type GetOrgMembersRequest struct { OrgRef string Cursor string Limit int SortDirection SortDirection }
type GetOrgMembersResponse ¶ added in v0.9.0
type GetOrgMembersResponse struct { Organization *cstypes.Organization Members []*OrgMemberResponse Cursor string }
type GetOrgsRequest ¶
type GetOrgsRequest struct { Cursor string Limit int SortDirection SortDirection Public bool Private bool }
type GetOrgsResponse ¶ added in v0.9.0
type GetOrgsResponse struct { Orgs []*cstypes.Organization Cursor string }
type GetProjectCommitStatusDeliveriesRequest ¶ added in v0.9.0
type GetProjectCommitStatusDeliveriesRequest struct { ProjectRef string DeliveryStatusFilter []string Cursor string Limit int SortDirection SortDirection }
type GetProjectCommitStatusDeliveriesResponse ¶ added in v0.9.0
type GetProjectCommitStatusDeliveriesResponse struct { CommitStatusDeliveries []*nstypes.CommitStatusDelivery Cursor string }
type GetProjectRunWebhookDeliveriesRequest ¶ added in v0.9.0
type GetProjectRunWebhookDeliveriesRequest struct { ProjectRef string DeliveryStatusFilter []string Cursor string Limit int SortDirection SortDirection }
type GetProjectRunWebhookDeliveriesResponse ¶ added in v0.9.0
type GetProjectRunWebhookDeliveriesResponse struct { RunWebhookDeliveries []*nstypes.RunWebhookDelivery Cursor string }
type GetRemoteSourcesRequest ¶
type GetRemoteSourcesRequest struct { Cursor string Limit int SortDirection SortDirection }
type GetRemoteSourcesResponse ¶ added in v0.9.0
type GetRemoteSourcesResponse struct { RemoteSources []*cstypes.RemoteSource Cursor string }
type GetSecretsRequest ¶
type GetSecretsRequest struct { ParentType cstypes.ObjectKind ParentRef string Tree bool RemoveOverridden bool }
type GetUserOrgsRequest ¶ added in v0.9.0
type GetUserOrgsRequest struct { UserRef string Cursor string Limit int SortDirection SortDirection }
type GetUserOrgsResponse ¶ added in v0.9.0
type GetUserOrgsResponse struct { Orgs []*csapitypes.UserOrgResponse Cursor string }
type GetUsersRequest ¶
type GetUsersRequest struct { Cursor string Limit int SortDirection SortDirection }
type GetUsersResponse ¶ added in v0.9.0
type GetUsersResponse struct { Users []*PrivateUserResponse Cursor string }
type GetVariablesRequest ¶
type GetVariablesRequest struct { ParentType cstypes.ObjectKind ParentRef string Tree bool RemoveOverridden bool }
type GroupRunsCursor ¶ added in v0.9.0
type GroupRunsCursor struct { StartRunCounter uint64 SortDirection SortDirection SubGroup string PhaseFilter []string ResultFilter []string }
type LoginUserRequest ¶
type LoginUserResponse ¶
type MaintenanceStatusResponse ¶ added in v0.8.0
type OrgInvitationActionRequest ¶ added in v0.8.0
type OrgInvitationActionRequest struct { OrgRef string Action csapitypes.OrgInvitationActionType `json:"action_type"` }
type OrgInvitationResponse ¶ added in v0.8.0
type OrgInvitationResponse struct { Organization *cstypes.Organization OrgInvitation *cstypes.OrgInvitation }
type OrgMemberResponse ¶
type OrgMemberResponse struct { User *cstypes.User Role cstypes.MemberRole }
type OrganizationMemberAddingMode ¶ added in v0.8.0
type OrganizationMemberAddingMode string
const ( OrganizationMemberAddingModeDirect OrganizationMemberAddingMode = "direct" OrganizationMemberAddingModeInvitation OrganizationMemberAddingMode = "invitation" )
type PrivateUserResponse ¶ added in v0.8.0
type ProjectCommitStatusRedeliveryRequest ¶ added in v0.9.0
type ProjectRunWebhookRedeliveryRequest ¶ added in v0.9.0
type RegisterUserRequest ¶
type RemoteSourceAuthResponse ¶
type RemoteSourceAuthResponse struct { Oauth2Redirect string Response interface{} }
type RemoteSourceAuthResult ¶
type RemoteSourceAuthResult struct { RequestType RemoteSourceRequestType Response interface{} }
type RemoteSourceRequestType ¶
type RemoteSourceRequestType string
const ( RemoteSourceRequestTypeCreateUserLA RemoteSourceRequestType = "createuserla" RemoteSourceRequestTypeLoginUser RemoteSourceRequestType = "loginuser" RemoteSourceRequestTypeAuthorize RemoteSourceRequestType = "authorize" RemoteSourceRequestTypeRegisterUser RemoteSourceRequestType = "registeruser" )
type RunActionType ¶
type RunActionType string
const ( RunActionTypeRestart RunActionType = "restart" RunActionTypeCancel RunActionType = "cancel" RunActionTypeStop RunActionType = "stop" )
type RunActionsRequest ¶
type RunTaskActionType ¶
type RunTaskActionType string
const (
RunTaskActionTypeApprove RunTaskActionType = "approve"
)
type RunTaskActionsRequest ¶
type SortDirection ¶ added in v0.9.0
type SortDirection string
const ( SortDirectionAsc SortDirection = "asc" SortDirectionDesc SortDirection = "desc" )
type StartCursor ¶ added in v0.9.0
type StartCursor struct { Start string SortDirection SortDirection }
type UpdateOrgRequest ¶ added in v0.8.0
type UpdateOrgRequest struct {
Visibility *cstypes.Visibility
}
type UpdateProjectGroupRequest ¶
type UpdateProjectGroupRequest struct { Name *string ParentRef *string Visibility *cstypes.Visibility }
type UpdateProjectRequest ¶
type UpdateSecretRequest ¶
type UpdateVariableRequest ¶
type UpdateVariableRequest struct { VariableName string Name string ParentType cstypes.ObjectKind ParentRef string Values []cstypes.VariableValue }
Click to show internal directories.
Click to hide internal directories.