types

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOrgMemberRequest

type AddOrgMemberRequest struct {
	Role MemberRole `json:"role"`
}

type AddOrgMemberResponse

type AddOrgMemberResponse struct {
	Organization *OrgResponse `json:"organization"`
	OrgMemberResponse
}

type AuthorizeResponse

type AuthorizeResponse struct {
	Oauth2Redirect   string    `json:"oauth2_redirect"`
	RemoteUserInfo   *UserInfo `json:"remote_user_info"`
	RemoteSourceName string    `json:"remote_source_name"`
}

type CommitStatusDeliveryResponse added in v0.9.0

type CommitStatusDeliveryResponse struct {
	ID             string         `json:"id"`
	Sequence       uint64         `json:"sequence"`
	DeliveryStatus DeliveryStatus `json:"delivery_status"`
	DeliveredAt    *time.Time     `json:"delivered_at"`
}

type CreateOrgInvitationRequest added in v0.8.0

type CreateOrgInvitationRequest struct {
	UserRef string           `json:"user_ref"`
	Role    types.MemberRole `json:"role"`
}

type CreateOrgRequest

type CreateOrgRequest struct {
	Name       string     `json:"name"`
	Visibility Visibility `json:"visibility"`
}

type CreateProjectGroupRequest

type CreateProjectGroupRequest struct {
	Name       string     `json:"name"`
	ParentRef  string     `json:"parent_ref"`
	Visibility Visibility `json:"visibility"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	Name                        string     `json:"name,omitempty"`
	ParentRef                   string     `json:"parent_ref,omitempty"`
	Visibility                  Visibility `json:"visibility,omitempty"`
	RepoPath                    string     `json:"repo_path,omitempty"`
	RemoteSourceName            string     `json:"remote_source_name,omitempty"`
	SkipSSHHostKeyCheck         bool       `json:"skip_ssh_host_key_check,omitempty"`
	PassVarsToForkedPR          bool       `json:"pass_vars_to_forked_pr,omitempty"`
	MembersCanPerformRunActions bool       `json:"members_can_perform_run_actions,omitempty"`
}

type CreateRemoteSourceRequest

type CreateRemoteSourceRequest struct {
	Name                string `json:"name"`
	APIURL              string `json:"apiurl"`
	Type                string `json:"type"`
	AuthType            string `json:"auth_type"`
	SkipVerify          bool   `json:"skip_verify"`
	Oauth2ClientID      string `json:"oauth_2_client_id"`
	Oauth2ClientSecret  string `json:"oauth_2_client_secret"`
	SSHHostKey          string `json:"ssh_host_key"`
	SkipSSHHostKeyCheck bool   `json:"skip_ssh_host_key_check"`
	RegistrationEnabled *bool  `json:"registration_enabled"`
	LoginEnabled        *bool  `json:"login_enabled"`
}

type CreateSecretRequest

type CreateSecretRequest struct {
	Name string `json:"name,omitempty"`

	Type SecretType `json:"type,omitempty"`

	// internal secret
	Data map[string]string `json:"data,omitempty"`

	// external secret
	SecretProviderID string `json:"secret_provider_id,omitempty"`
	Path             string `json:"path,omitempty"`
}

type CreateUserLARequest

type CreateUserLARequest struct {
	RemoteSourceName          string `json:"remote_source_name"`
	RemoteSourceLoginName     string `json:"remote_source_login_name"`
	RemoteSourceLoginPassword string `json:"remote_source_login_password"`
}

type CreateUserLAResponse

type CreateUserLAResponse struct {
	LinkedAccount  *LinkedAccount `json:"linked_account"`
	Oauth2Redirect string         `json:"oauth2_redirect"`
}

type CreateUserRequest

type CreateUserRequest struct {
	UserName string `json:"username"`
}

type CreateUserTokenRequest

type CreateUserTokenRequest struct {
	TokenName string `json:"token_name"`
}

type CreateUserTokenResponse

type CreateUserTokenResponse struct {
	Token string `json:"token"`
}

type CreateVariableRequest

type CreateVariableRequest struct {
	Name string `json:"name,omitempty"`

	Values []VariableValueRequest `json:"values,omitempty"`
}

type DeliveryStatus added in v0.9.0

type DeliveryStatus string
const (
	DeliveryStatusNotDelivered  DeliveryStatus = "notDelivered"
	DeliveryStatusDelivered     DeliveryStatus = "delivered"
	DeliveryStatusDeliveryError DeliveryStatus = "deliveryError"
)

func DeliveryStatusFromStringSlice added in v0.9.0

func DeliveryStatusFromStringSlice(slice []string) []DeliveryStatus

type LinkedAccount

type LinkedAccount struct {
	ID string `json:"id,omitempty"`

	RemoteUserID        string `json:"remote_user_id,omitempty"`
	RemoteUserName      string `json:"remote_username,omitempty"`
	RemoteUserAvatarURL string `json:"remote_user_avatar_url,omitempty"`

	RemoteSourceID string `json:"remote_source_id,omitempty"`
}

type LinkedAccountResponse

type LinkedAccountResponse struct {
	ID                  string `json:"id"`
	RemoteSourceID      string `json:"remote_source_id"`
	RemoteUserName      string `json:"remote_user_name"`
	RemoteUserAvatarURL string `json:"remote_user_avatar_url"`
}

type LoginUserRequest

type LoginUserRequest struct {
	RemoteSourceName string `json:"remote_source_name"`
	LoginName        string `json:"login_name"`
	LoginPassword    string `json:"password"`
}

type LoginUserResponse

type LoginUserResponse struct {
	Oauth2Redirect string        `json:"oauth2_redirect"`
	User           *UserResponse `json:"user"`
}

type MaintenanceStatusResponse added in v0.8.0

type MaintenanceStatusResponse struct {
	RequestedStatus bool
	CurrentStatus   bool
}

type MemberRole

type MemberRole string
const (
	MemberRoleOwner  MemberRole = "owner"
	MemberRoleMember MemberRole = "member"
)

type OrgInvitationActionRequest added in v0.8.0

type OrgInvitationActionRequest struct {
	Action csapitypes.OrgInvitationActionType `json:"action_type"`
}

type OrgInvitationResponse added in v0.8.0

type OrgInvitationResponse struct {
	ID               string `json:"id"`
	UserID           string `json:"user_ref"`
	OrganizationID   string `json:"organization_id"`
	OrganizationName string `json:"organization_name"`
}

type OrgMemberResponse

type OrgMemberResponse struct {
	User *UserResponse `json:"user"`
	Role MemberRole    `json:"role"`
}

type OrgMembersResponse

type OrgMembersResponse struct {
	Organization *OrgResponse         `json:"organization"`
	Members      []*OrgMemberResponse `json:"members"`
}

type OrgResponse

type OrgResponse struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	Visibility Visibility `json:"visibility,omitempty"`
}

type PrivateUserResponse added in v0.8.0

type PrivateUserResponse struct {
	ID             string                   `json:"id"`
	UserName       string                   `json:"username"`
	Tokens         []string                 `json:"tokens"`
	LinkedAccounts []*LinkedAccountResponse `json:"linked_accounts"`
}

type ProjectCreateRunRequest

type ProjectCreateRunRequest struct {
	Branch    string `json:"branch,omitempty"`
	Tag       string `json:"tag,omitempty"`
	Ref       string `json:"ref,omitempty"`
	CommitSHA string `json:"commit_sha,omitempty"`
}

type ProjectGroupResponse

type ProjectGroupResponse struct {
	ID               string     `json:"id"`
	Name             string     `json:"name"`
	Path             string     `json:"path"`
	ParentPath       string     `json:"parent_path"`
	Visibility       Visibility `json:"visibility"`
	GlobalVisibility string     `json:"global_visibility"`
}

type ProjectResponse

type ProjectResponse struct {
	ID                          string     `json:"id,omitempty"`
	Name                        string     `json:"name,omitempty"`
	Path                        string     `json:"path,omitempty"`
	ParentPath                  string     `json:"parent_path,omitempty"`
	Visibility                  Visibility `json:"visibility,omitempty"`
	GlobalVisibility            string     `json:"global_visibility,omitempty"`
	PassVarsToForkedPR          bool       `json:"pass_vars_to_forked_pr,omitempty"`
	DefaultBranch               string     `json:"default_branch,omitempty"`
	MembersCanPerformRunActions bool       `json:"members_can_perform_run_actions,omitempty"`
}

type RegisterUserRequest

type RegisterUserRequest struct {
	CreateUserRequest
	CreateUserLARequest
}

type RegisterUserResponse

type RegisterUserResponse struct {
	Oauth2Redirect string `json:"oauth2_redirect"`
}

type RemoteRepoResponse

type RemoteRepoResponse struct {
	ID   string `json:"id,omitempty"`
	Path string `json:"path,omitempty"`
}

type RemoteSourceAuthResult

type RemoteSourceAuthResult struct {
	RequestType string      `json:"request_type,omitempty"`
	Response    interface{} `json:"response,omitempty"`
}

type RemoteSourceResponse

type RemoteSourceResponse struct {
	ID                  string `json:"id"`
	Name                string `json:"name"`
	AuthType            string `json:"auth_type"`
	RegistrationEnabled bool   `json:"registration_enabled"`
	LoginEnabled        bool   `json:"login_enabled"`
}

type RunActionType

type RunActionType string
const (
	RunActionTypeRestart RunActionType = "restart"
	RunActionTypeCancel  RunActionType = "cancel"
	RunActionTypeStop    RunActionType = "stop"
)

type RunActionsRequest

type RunActionsRequest struct {
	ActionType RunActionType `json:"action_type"`

	// Restart
	FromStart bool `json:"from_start"`
}

type RunResponse

type RunResponse struct {
	Number      uint64            `json:"number"`
	Name        string            `json:"name"`
	Annotations map[string]string `json:"annotations"`
	Phase       rstypes.RunPhase  `json:"phase"`
	Result      rstypes.RunResult `json:"result"`
	SetupErrors []string          `json:"setup_errors"`
	Stopping    bool              `json:"stopping"`

	Tasks                map[string]*RunResponseTask `json:"tasks"`
	TasksWaitingApproval []string                    `json:"tasks_waiting_approval"`

	EnqueueTime *time.Time `json:"enqueue_time"`
	StartTime   *time.Time `json:"start_time"`
	EndTime     *time.Time `json:"end_time"`

	CanRestartFromScratch     bool `json:"can_restart_from_scratch"`
	CanRestartFromFailedTasks bool `json:"can_restart_from_failed_tasks"`
}

type RunResponseTask

type RunResponseTask struct {
	ID       string                                  `json:"id"`
	Name     string                                  `json:"name"`
	Status   rstypes.RunTaskStatus                   `json:"status"`
	Timedout bool                                    `json:"timedout"`
	Level    int                                     `json:"level"`
	Depends  map[string]*rstypes.RunConfigTaskDepend `json:"depends"`

	WaitingApproval     bool              `json:"waiting_approval"`
	Approved            bool              `json:"approved"`
	ApprovalAnnotations map[string]string `json:"approval_annotations"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`

	TaskTimeoutInterval time.Duration `json:"task_timeout_interval"`
}

type RunTaskActionType

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

type RunTaskActionsRequest

type RunTaskActionsRequest struct {
	ActionType RunTaskActionType `json:"action_type"`
}

type RunTaskResponse

type RunTaskResponse struct {
	ID         string                     `json:"id"`
	Name       string                     `json:"name"`
	Status     rstypes.RunTaskStatus      `json:"status"`
	Timedout   bool                       `json:"timedout"`
	Containers []RunTaskResponseContainer `json:"containers"`

	WaitingApproval     bool              `json:"waiting_approval"`
	Approved            bool              `json:"approved"`
	ApprovalAnnotations map[string]string `json:"approval_annotations"`

	SetupStep *RunTaskResponseSetupStep `json:"setup_step"`
	Steps     []*RunTaskResponseStep    `json:"steps"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`

	TaskTimeoutInterval time.Duration `json:"task_timeout_interval"`
}

type RunTaskResponseContainer added in v0.8.0

type RunTaskResponseContainer struct {
	Image string `json:"image"`
}

type RunTaskResponseSetupStep

type RunTaskResponseSetupStep struct {
	Phase rstypes.ExecutorTaskPhase `json:"phase"`
	Name  string                    `json:"name"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
}

type RunTaskResponseStep

type RunTaskResponseStep struct {
	Phase   rstypes.ExecutorTaskPhase `json:"phase"`
	Type    string                    `json:"type"`
	Name    string                    `json:"name"`
	Command string                    `json:"command"`
	Shell   string                    `json:"shell"`

	ExitStatus *int `json:"exit_status"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`

	LogArchived bool `json:"log_archived"`
}

type RunWebhookDeliveryResponse added in v0.9.0

type RunWebhookDeliveryResponse struct {
	ID             string         `json:"id"`
	Sequence       uint64         `json:"sequence"`
	DeliveryStatus DeliveryStatus `json:"delivery_status"`
	DeliveredAt    *time.Time     `json:"delivered_at"`
	StatusCode     int            `json:"status_code"`
}

type RunsResponse

type RunsResponse struct {
	Number      uint64            `json:"number"`
	Name        string            `json:"name"`
	Annotations map[string]string `json:"annotations"`
	Phase       rstypes.RunPhase  `json:"phase"`
	Result      rstypes.RunResult `json:"result"`

	TasksWaitingApproval []string `json:"tasks_waiting_approval"`

	EnqueueTime *time.Time `json:"enqueue_time"`
	StartTime   *time.Time `json:"start_time"`
	EndTime     *time.Time `json:"end_time"`
}

type SecretResponse

type SecretResponse struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	ParentPath string `json:"parent_path"`
}

type SecretType

type SecretType string
const (
	SecretTypeInternal SecretType = "internal"
	SecretTypeExternal SecretType = "external"
)

type SortDirection added in v0.9.0

type SortDirection string
const (
	SortDirectionAsc  SortDirection = "asc"
	SortDirectionDesc SortDirection = "desc"
)

type UpdateOrgRequest added in v0.8.0

type UpdateOrgRequest struct {
	Visibility *Visibility `json:"visibility"`
}

type UpdateProjectGroupRequest

type UpdateProjectGroupRequest struct {
	Name       *string     `json:"name,omitempty"`
	ParentRef  *string     `json:"parent_ref,omitempty"`
	Visibility *Visibility `json:"visibility,omitempty"`
}

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Name                        *string     `json:"name,omitempty"`
	ParentRef                   *string     `json:"parent_ref,omitempty"`
	Visibility                  *Visibility `json:"visibility,omitempty"`
	PassVarsToForkedPR          *bool       `json:"pass_vars_to_forked_pr,omitempty"`
	MembersCanPerformRunActions *bool       `json:"members_can_perform_run_actions,omitempty"`
}

type UpdateRemoteSourceRequest

type UpdateRemoteSourceRequest struct {
	Name                *string `json:"name"`
	APIURL              *string `json:"apiurl"`
	SkipVerify          *bool   `json:"skip_verify"`
	Oauth2ClientID      *string `json:"oauth_2_client_id"`
	Oauth2ClientSecret  *string `json:"oauth_2_client_secret"`
	SSHHostKey          *string `json:"ssh_host_key"`
	SkipSSHHostKeyCheck *bool   `json:"skip_ssh_host_key_check"`
	RegistrationEnabled *bool   `json:"registration_enabled"`
	LoginEnabled        *bool   `json:"login_enabled"`
}

type UpdateSecretRequest

type UpdateSecretRequest struct {
	Name string `json:"name,omitempty"`

	Type SecretType `json:"type,omitempty"`

	// internal secret
	Data map[string]string `json:"data,omitempty"`

	// external secret
	SecretProviderID string `json:"secret_provider_id,omitempty"`
	Path             string `json:"path,omitempty"`
}

type UpdateVariableRequest

type UpdateVariableRequest struct {
	Name string `json:"name,omitempty"`

	Values []VariableValueRequest `json:"values,omitempty"`
}

type UserCreateRunRequest

type UserCreateRunRequest struct {
	RepoUUID  string `json:"repo_uuid,omitempty"`
	RepoPath  string `json:"repo_path,omitempty"`
	Branch    string `json:"branch,omitempty"`
	Tag       string `json:"tag,omitempty"`
	Ref       string `json:"ref,omitempty"`
	CommitSHA string `json:"commit_sha,omitempty"`
	Message   string `json:"message,omitempty"`

	PullRequestRefRegexes []string          `json:"pull_request_ref_regexes,omitempty"`
	Variables             map[string]string `json:"variables,omitempty"`
}

type UserInfo

type UserInfo struct {
	ID        string
	LoginName string
	Email     string
}

type UserOrgResponse added in v0.9.0

type UserOrgResponse struct {
	Organization *OrgResponse
	Role         MemberRole
}

type UserResponse

type UserResponse struct {
	ID       string `json:"id"`
	UserName string `json:"username"`
}

type VariableResponse

type VariableResponse struct {
	ID         string          `json:"id"`
	Name       string          `json:"name"`
	Values     []VariableValue `json:"values"`
	ParentPath string          `json:"parent_path"`
}

type VariableValue

type VariableValue struct {
	SecretName               string `json:"secret_name"`
	SecretVar                string `json:"secret_var"`
	MatchingSecretParentPath string `json:"matching_secret_parent_path"`

	When *types.When `json:"when"`
}

type VariableValueRequest

type VariableValueRequest struct {
	SecretName string `json:"secret_name"`
	SecretVar  string `json:"secret_var"`

	When *types.When `json:"when"`
}

type VersionResponse added in v0.3.0

type VersionResponse struct {
	Service string `json:"service"`
	Version string `json:"version"`
}

type Visibility

type Visibility string
const (
	VisibilityPublic  Visibility = "public"
	VisibilityPrivate Visibility = "private"
)

Jump to

Keyboard shortcuts

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