action

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

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 MarshalCursor(c any) (string, error)

func UnmarshalCursor added in v0.9.0

func UnmarshalCursor(cs string, c any) error

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 (*ActionHandler) CanAuthUserDoRunActions added in v0.9.0

func (h *ActionHandler) CanAuthUserDoRunActions(ctx context.Context, groupType scommon.GroupType, ref string, actionType actionType) (bool, string, error)

func (*ActionHandler) CanAuthUserGetRun added in v0.9.0

func (h *ActionHandler) CanAuthUserGetRun(ctx context.Context, groupType scommon.GroupType, ref string) (bool, string, error)

func (*ActionHandler) CreateOrg

func (*ActionHandler) CreateOrgInvitation added in v0.8.0

func (*ActionHandler) CreateProject

func (h *ActionHandler) CreateProject(ctx context.Context, req *CreateProjectRequest) (*csapitypes.Project, error)

func (*ActionHandler) CreateProjectGroup

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 (*ActionHandler) CreateUserToken

func (h *ActionHandler) CreateUserToken(ctx context.Context, req *CreateUserTokenRequest) (string, error)

func (*ActionHandler) CreateVariable

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 (h *ActionHandler) DeleteOrgInvitation(ctx context.Context, orgRef string, userRef 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, 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) Export added in v0.8.0

func (h *ActionHandler) Export(ctx context.Context, serviceName string) (*http.Response, error)

func (*ActionHandler) GetBadge

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

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

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 (*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 (*ActionHandler) GetOrgs

func (*ActionHandler) GetProject

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

func (*ActionHandler) GetProjectCommitStatusDeliveries added in v0.9.0

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 (*ActionHandler) GetRemoteSource

func (h *ActionHandler) GetRemoteSource(ctx context.Context, rsRef string) (*cstypes.RemoteSource, error)

func (*ActionHandler) GetRemoteSources

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) GetUser

func (h *ActionHandler) GetUser(ctx context.Context, userRef string) (*cstypes.User, 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 (*ActionHandler) GetUsers

func (*ActionHandler) GetVariables

func (*ActionHandler) GetVersion added in v0.3.0

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) Import added in v0.8.0

func (h *ActionHandler) Import(ctx context.Context, r io.Reader, serviceName string) 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 (h *ActionHandler) IsAuthUserOrgOwner(ctx context.Context, orgID string) (bool, error)

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 (h *ActionHandler) IsUserOrgMember(ctx context.Context, userRef, orgRef string) (bool, error)

func (*ActionHandler) LoginUser

func (*ActionHandler) MaintenanceMode added in v0.8.0

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

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 (*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 (*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 AuthorizeRequest struct {
	RemoteSourceName string

	RemoteUserName string
	RemotePassword string

	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time
}

type AuthorizeResponse

type AuthorizeResponse struct {
	RemoteUserInfo   *gitsource.UserInfo
	RemoteSourceName string
}

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 CreateProjectRequest struct {
	Name                        string
	ParentRef                   string
	Visibility                  cstypes.Visibility
	RemoteSourceName            string
	RepoPath                    string
	SkipSSHHostKeyCheck         bool
	PassVarsToForkedPR          bool
	MembersCanPerformRunActions bool
}

type CreateRemoteSourceRequest

type CreateRemoteSourceRequest struct {
	Name                string
	APIURL              string
	SkipVerify          bool
	Type                string
	AuthType            string
	Oauth2ClientID      string
	Oauth2ClientSecret  string
	SSHHostKey          string
	SkipSSHHostKeyCheck bool
	RegistrationEnabled *bool
	LoginEnabled        *bool
}

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 CreateUserLARequest struct {
	UserRef string

	RemoteSourceName string

	RemoteUserName string
	RemotePassword string

	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time
}

type CreateUserLAResponse

type CreateUserLAResponse struct {
	LinkedAccount *cstypes.LinkedAccount
}

type CreateUserRequest

type CreateUserRequest struct {
	UserName string
}

type CreateUserTokenRequest

type CreateUserTokenRequest struct {
	UserRef   string
	TokenName string
}

type CreateVariableRequest

type CreateVariableRequest struct {
	Name string

	ParentType cstypes.ObjectKind
	ParentRef  string

	Values []cstypes.VariableValue
}

type DeleteLogsRequest added in v0.4.0

type DeleteLogsRequest struct {
	GroupType scommon.GroupType
	Ref       string
	RunNumber uint64
	TaskID    string
	Setup     bool
	Step      int
}

type DeliveryCursor added in v0.9.0

type DeliveryCursor struct {
	StartSequence uint64

	SortDirection SortDirection

	DeliveryStatusFilter []string
}

type GetGroupRunsRequest added in v0.9.0

type GetGroupRunsRequest struct {
	GroupType scommon.GroupType
	Ref       string

	Cursor string

	Limit         int
	SortDirection SortDirection

	StartRunCounter uint64
	SubGroup        string
	PhaseFilter     []string
	ResultFilter    []string
}

type GetGroupRunsResponse added in v0.9.0

type GetGroupRunsResponse struct {
	Runs                    []*rstypes.Run
	ChangeGroupsUpdateToken string

	Cursor string
}

type GetLogsRequest

type GetLogsRequest struct {
	GroupType scommon.GroupType
	Ref       string
	RunNumber uint64
	TaskID    string
	Setup     bool
	Step      int
	Follow    bool
}

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 LoginUserRequest struct {
	RemoteSourceName string

	RemoteUserName string
	RemotePassword string

	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time
}

type LoginUserResponse

type LoginUserResponse struct {
	Cookie          *http.Cookie
	SecondaryCookie *http.Cookie

	User *cstypes.User
}

type MaintenanceStatusResponse added in v0.8.0

type MaintenanceStatusResponse struct {
	RequestedStatus bool
	CurrentStatus   bool
}

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 PrivateUserResponse struct {
	User           *cstypes.User
	Tokens         []*cstypes.UserToken
	LinkedAccounts []*cstypes.LinkedAccount
}

type ProjectCommitStatusRedeliveryRequest added in v0.9.0

type ProjectCommitStatusRedeliveryRequest struct {
	ProjectRef             string
	CommitStatusDeliveryID string
}

type ProjectRunWebhookRedeliveryRequest added in v0.9.0

type ProjectRunWebhookRedeliveryRequest struct {
	ProjectRef           string
	RunWebhookDeliveryID string
}

type RegisterUserRequest

type RegisterUserRequest struct {
	UserName string

	RemoteSourceName string

	RemoteUserName string
	RemotePassword string

	Oauth2AccessToken          string
	Oauth2RefreshToken         string
	Oauth2AccessTokenExpiresAt time.Time
}

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 RunActionsRequest struct {
	GroupType  scommon.GroupType
	Ref        string
	RunNumber  uint64
	ActionType RunActionType

	// Restart
	FromStart bool
}

type RunTaskActionType

type RunTaskActionType string
const (
	RunTaskActionTypeApprove RunTaskActionType = "approve"
)

type RunTaskActionsRequest

type RunTaskActionsRequest struct {
	GroupType scommon.GroupType
	Ref       string
	RunNumber uint64
	TaskID    string

	ActionType RunTaskActionType
}

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 UpdateProjectRequest struct {
	Name      *string
	ParentRef *string

	Visibility                  *cstypes.Visibility
	PassVarsToForkedPR          *bool
	MembersCanPerformRunActions *bool
}

type UpdateRemoteSourceRequest

type UpdateRemoteSourceRequest struct {
	RemoteSourceRef string

	Name                *string
	APIURL              *string
	SkipVerify          *bool
	Oauth2ClientID      *string
	Oauth2ClientSecret  *string
	SSHHostKey          *string
	SkipSSHHostKeyCheck *bool
	RegistrationEnabled *bool
	LoginEnabled        *bool
}

type UpdateSecretRequest

type UpdateSecretRequest struct {
	SecretName string

	Name string

	ParentType cstypes.ObjectKind
	ParentRef  string

	Type cstypes.SecretType

	// internal secret
	Data map[string]string

	// external secret
	SecretProviderID string
	Path             string
}

type UpdateVariableRequest

type UpdateVariableRequest struct {
	VariableName string

	Name string

	ParentType cstypes.ObjectKind
	ParentRef  string

	Values []cstypes.VariableValue
}

type UserCreateRunRequest

type UserCreateRunRequest struct {
	RepoUUID  string
	RepoPath  string
	Branch    string
	Tag       string
	Ref       string
	CommitSHA string
	Message   string

	PullRequestRefRegexes []string
	Variables             map[string]string
}

Jump to

Keyboard shortcuts

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