buddy

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GroupMemberStatusManager = "MANAGER"
	GroupMemberStatusMember  = "MEMBER"
)
View Source
const (
	IntegrationTypeDigitalOcean         = "DIGITAL_OCEAN"
	IntegrationTypeAmazon               = "AMAZON"
	IntegrationTypeStackHawk            = "STACK_HAWK"
	IntegrationTypeShopify              = "SHOPIFY"
	IntegrationTypePushover             = "PUSHOVER"
	IntegrationTypeRackspace            = "RACKSPACE"
	IntegrationTypeCloudflare           = "CLOUDFLARE"
	IntegrationTypeNewRelic             = "NEW_RELIC"
	IntegrationTypeSentry               = "SENTRY"
	IntegrationTypeRollbar              = "ROLLBAR"
	IntegrationTypeDatadog              = "DATADOG"
	IntegrationTypeDigitalOceanSpaces   = "DO_SPACES"
	IntegrationTypeHoneybadger          = "HONEYBADGER"
	IntegrationTypeVultr                = "VULTR"
	IntegrationTypeSentryEnterprise     = "SENTRY_ENTERPRISE"
	IntegrationTypeLoggly               = "LOGGLY"
	IntegrationTypeFirebase             = "FIREBASE"
	IntegrationTypeUpcloud              = "UPCLOUD"
	IntegrationTypeGhostInspector       = "GHOST_INSPECTOR"
	IntegrationTypeAzureCloud           = "AZURE_CLOUD"
	IntegrationTypeDockerHub            = "DOCKER_HUB"
	IntegrationTypeGoogleServiceAccount = "GOOGLE_SERVICE_ACCOUNT"
	IntegrationTypeGitHub               = "GIT_HUB"
	IntegrationTypeGitLab               = "GIT_LAB"

	IntegrationScopePrivate          = "PRIVATE"
	IntegrationScopeWorkspace        = "WORKSPACE"
	IntegrationScopeAdmin            = "ADMIN"
	IntegrationScopeGroup            = "GROUP"
	IntegrationScopeProject          = "PROJECT"
	IntegrationScopeAdminInProject   = "ADMIN_IN_PROJECT"
	IntegrationScopeGroupInProject   = "GROUP_IN_PROJECT"
	IntegrationScopePrivateInProject = "PRIVATE_IN_PROJECT"

	IntegrationAuthTypeToken             = "TOKEN"
	IntegrationAuthTypeTokenAppExtension = "TOKEN_APP_EXTENSION"
	IntegrationAuthTypeDefault           = "DEFAULT"
	IntegrationAuthTypeTrusted           = "TRUSTED"
	IntegrationAuthTypeOidc              = "OIDC"
)
View Source
const (
	PermissionAccessLevelDenied    = "DENIED"
	PermissionAccessLevelReadOnly  = "READ_ONLY"
	PermissionAccessLevelReadWrite = "READ_WRITE"
	PermissionAccessLevelManage    = "MANAGE"
	PermissionAccessLevelRunOnly   = "RUN_ONLY"

	PermissionTypeDeveloper      = "DEVELOPER"
	PermissionTypeReadOnly       = "READ_ONLY"
	PermissionTypeProjectManager = "PROJECT_MANAGER"
	PermissionTypeCustom         = "CUSTOM"
)
View Source
const (
	PipelineOnClick    = "CLICK"
	PipelineOnEvent    = "EVENT"
	PipelineOnSchedule = "SCHEDULE"

	PipelineEventTypePush      = "PUSH"
	PipelineEventTypeCreateRef = "CREATE_REF"
	PipelineEventTypeDeleteRef = "DELETE_REF"

	PipelineTriggerConditionOnChange                   = "ON_CHANGE"
	PipelineTriggerConditionOnChangeAtPath             = "ON_CHANGE_AT_PATH"
	PipelineTriggerConditionVarIs                      = "VAR_IS"
	PipelineTriggerConditionVarIsNot                   = "VAR_IS_NOT"
	PipelineTriggerConditionVarContains                = "VAR_CONTAINS"
	PipelineTriggerConditionVarNotContains             = "VAR_NOT_CONTAINS"
	PipelineTriggerConditionDateTime                   = "DATETIME"
	PipelineTriggerConditionSuccessPipeline            = "SUCCESS_PIPELINE"
	PipelineTriggerConditionTriggeringUserIs           = "TRIGGERING_USER_IS"
	PipelineTriggerConditionTriggeringUserIsNot        = "TRIGGERING_USER_IS_NOT"
	PipelineTriggerConditionTriggeringUserIsInGroup    = "TRIGGERING_USER_IS_IN_GROUP"
	PipelineTriggerConditionTriggeringUserIsNotInGroup = "TRIGGERING_USER_IS_NOT_IN_GROUP"

	PipelinePriorityHigh   = "HIGH"
	PipelinePriorityNormal = "NORMAL"
	PipelinePriorityLow    = "LOW"

	PipelineDefinitionSourceLocal  = "LOCAL"
	PipelineDefinitionSourceRemote = "REMOTE"

	PipelinePermissionDefault   = "DEFAULT"
	PipelinePermissionDenied    = "DENIED"
	PipelinePermissionReadOnly  = "READ_ONLY"
	PipelinePermissionRunOnly   = "RUN_ONLY"
	PipelinePermissionReadWrite = "READ_WRITE"

	PipelineGitConfigRefNone    = "NONE"
	PipelineGitConfigRefDynamic = "DYNAMIC"
	PipelineGitConfigRefFixed   = "FIXED"
)
View Source
const (
	ProjectStatusActive = "ACTIVE"
	ProjectStatusClosed = "CLOSED"

	ProjectAccessPublic  = "PUBLIC"
	ProjectAccessPrivate = "PRIVATE"
)
View Source
const (
	SourceContentTypeDir       = "DIR"
	SourceContentTypeFile      = "FILE"
	SourceContentTypeSubModule = "SUB_MODULE"
	SourceContentTypeSymlink   = "SYMLINK"
)
View Source
const (
	SignatureMethodSha1   = "sha1"
	SignatureMethodSha256 = "sha256"
	SignatureMethodSha512 = "sha512"

	DigestMethodSha1   = "sha1"
	DigestMethodSha256 = "sha256"
	DigestMethodSha512 = "sha512"

	SsoTypeSaml = "SAML"
	SsoTypeOidc = "OIDC"
)
View Source
const (
	TokenScopeWorkspace       = "WORKSPACE"
	TokenScopeProjectDelete   = "PROJECT_DELETE"
	TokenScopeRepositoryRead  = "REPOSITORY_READ"
	TokenScopeRepositoryWrite = "REPOSITORY_WRITE"
	TokenScopeExecutionInfo   = "EXECUTION_INFO"
	TokenScopeExecutionRun    = "EXECUTION_RUN"
	TokenScopeExecutionManage = "EXECUTION_MANAGE"
	TokenScopeUserInfo        = "USER_INFO"
	TokenScopeUserKey         = "USER_KEY"
	TokenScopeUserEmail       = "USER_EMAIL"
	TokenScopeIntegrationInfo = "INTEGRATION_INFO"
	TokenScopeMemberEmail     = "MEMBER_EMAIL"
	TokenScopeManageEmails    = "MANAGE_EMAILS"
	TokenScopeWebhookInfo     = "WEBHOOK_INFO"
	TokenScopeWebhookAdd      = "WEBHOOK_ADD"
	TokenScopeWebhookManage   = "WEBHOOK_MANAGE"
	TokenScopeVariableAdd     = "VARIABLE_ADD"
	TokenScopeVariableInfo    = "VARIABLE_INFO"
	TokenScopeVariableManage  = "VARIABLE_MANAGE"
	TokenScopeTokenInfo       = "TOKEN_INFO"
	TokenScopeTokenManage     = "TOKEN_MANAGE"
)
View Source
const (
	VariableTypeVar    = "VAR"
	VariableTypeSshKey = "SSH_KEY"

	VariableSshKeyFilePlaceContainer = "CONTAINER"
	VariableSshKeyFilePlaceNone      = "NONE"
)
View Source
const (
	WebhookEventPush                = "PUSH"
	WebhookEventExecutionStarted    = "EXECUTION_STARTED"
	WebhookEventExecutionSuccessful = "EXECUTION_SUCCESSFUL"
	WebhookEventExecutionFailed     = "EXECUTION_FAILED"
	WebhookEventExecutionFinished   = "EXECUTION_FINISHED"
)

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(req *retryablehttp.Request, res *http.Response) error

Types

type Client

type Client struct {
	ProfileService       *ProfileService
	ProfileEmailService  *ProfileEmailService
	GroupService         *GroupService
	MemberService        *MemberService
	PermissionService    *PermissionService
	WorkspaceService     *WorkspaceService
	PublicKeyService     *PublicKeyService
	ProjectService       *ProjectService
	ProjectMemberService *ProjectMemberService
	ProjectGroupService  *ProjectGroupService
	WebhookService       *WebhookService
	VariableService      *VariableService
	SsoService           *SsoService
	IntegrationService   *IntegrationService
	PipelineService      *PipelineService
	TokenService         *TokenService
	SourceService        *SourceService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string, baseUrl string, insecure bool) (*Client, error)

func NewClientWithTimeout added in v1.13.2

func NewClientWithTimeout(token string, baseUrl string, insecure bool, timeout time.Duration) (*Client, error)

func NewDefaultClient

func NewDefaultClient(token string) (*Client, error)

func (*Client) Create

func (c *Client) Create(url *UrlPath, postBody interface{}, query interface{}, respBody interface{}) (*http.Response, error)

func (*Client) Delete

func (c *Client) Delete(url *UrlPath, body interface{}, query interface{}) (*http.Response, error)

func (*Client) Do

func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(url *UrlPath, respBody interface{}, query interface{}) (*http.Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, body interface{}, params interface{}) (*retryablehttp.Request, error)

func (*Client) NewUrlPath

func (c *Client) NewUrlPath(path string, a ...interface{}) *UrlPath

func (*Client) Patch

func (c *Client) Patch(url *UrlPath, patchBody interface{}, query interface{}, respBody interface{}) (*http.Response, error)

func (*Client) Put

func (c *Client) Put(url *UrlPath, putBody interface{}, query interface{}, respBody interface{}) (*http.Response, error)

type ErrorResponse

type ErrorResponse struct {
	Body     []byte
	Response *http.Response
	Request  *retryablehttp.Request
	Message  string
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type Group

type Group struct {
	Url                       string `json:"url"`
	HtmlUrl                   string `json:"html_url"`
	Id                        int    `json:"id"`
	Name                      string `json:"name"`
	Description               string `json:"description"`
	AutoAssignToNewProjects   bool   `json:"auto_assign_to_new_projects"`
	AutoAssignPermissionSetId int    `json:"auto_assign_permission_set_id"`
}

type GroupMemberOps

type GroupMemberOps struct {
	Id     *int    `json:"id,omitempty"`
	Status *string `json:"status,omitempty"`
}

type GroupOps

type GroupOps struct {
	Name                      *string `json:"name,omitempty"`
	Description               *string `json:"description,omitempty"`
	AutoAssignToNewProjects   *bool   `json:"auto_assign_to_new_projects,omitempty"`
	AutoAssignPermissionSetId *int    `json:"auto_assign_permission_set_id,omitempty"`
}

type GroupService

type GroupService struct {
	// contains filtered or unexported fields
}

func (*GroupService) AddGroupMember

func (s *GroupService) AddGroupMember(domain string, groupId int, ops *GroupMemberOps) (*Member, *http.Response, error)

func (*GroupService) Create

func (s *GroupService) Create(domain string, ops *GroupOps) (*Group, *http.Response, error)

func (*GroupService) Delete

func (s *GroupService) Delete(domain string, groupId int) (*http.Response, error)

func (*GroupService) DeleteGroupMember

func (s *GroupService) DeleteGroupMember(domain string, groupId int, memberId int) (*http.Response, error)

func (*GroupService) Get

func (s *GroupService) Get(domain string, groupId int) (*Group, *http.Response, error)

func (*GroupService) GetGroupMember

func (s *GroupService) GetGroupMember(domain string, groupId int, memberId int) (*Member, *http.Response, error)

func (*GroupService) GetGroupMembers

func (s *GroupService) GetGroupMembers(domain string, groupId int) (*Members, *http.Response, error)

func (*GroupService) GetList

func (s *GroupService) GetList(domain string) (*Groups, *http.Response, error)

func (*GroupService) Update

func (s *GroupService) Update(domain string, groupId int, ops *GroupOps) (*Group, *http.Response, error)

func (*GroupService) UpdateGroupMember added in v1.3.0

func (s *GroupService) UpdateGroupMember(domain string, groupId int, memberId int, status string) (*Member, *http.Response, error)

type Groups

type Groups struct {
	Url     string   `json:"url"`
	HtmlUrl string   `json:"html_url"`
	Groups  []*Group `json:"groups"`
}

type Integration

type Integration struct {
	Url         string `json:"url"`
	HtmlUrl     string `json:"html_url"`
	HashId      string `json:"hash_id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	AuthType    string `json:"auth_type"`
	Scope       string `json:"scope"`
	ProjectName string `json:"project_name"`
	Identifier  string `json:"identifier"`
	GroupId     int    `json:"group_id"`
}

type IntegrationOps

type IntegrationOps struct {
	Name            *string            `json:"name,omitempty"`
	Type            *string            `json:"type,omitempty"`
	Scope           *string            `json:"scope,omitempty"`
	ProjectName     *string            `json:"project_name,omitempty"`
	GroupId         *int               `json:"group_id,omitempty"`
	Username        *string            `json:"username,omitempty"`
	Shop            *string            `json:"shop,omitempty"`
	Token           *string            `json:"token,omitempty"`
	AccessKey       *string            `json:"access_key,omitempty"`
	SecretKey       *string            `json:"secret_key,omitempty"`
	Audience        *string            `json:"audience,omitempty"`
	AppId           *string            `json:"app_id,omitempty"`
	TenantId        *string            `json:"tenant_id,omitempty"`
	Password        *string            `json:"password,omitempty"`
	ApiKey          *string            `json:"api_key,omitempty"`
	Email           *string            `json:"email,omitempty"`
	AuthType        *string            `json:"auth_type,omitempty"`
	PartnerToken    *string            `json:"partner_token,omitempty"`
	GoogleProject   *string            `json:"google_project,omitempty"`
	Config          *string            `json:"config,omitempty"`
	Identifier      *string            `json:"identifier,omitempty"`
	RoleAssumptions *[]*RoleAssumption `json:"role_assumptions,omitempty"`
}

type IntegrationService

type IntegrationService struct {
	// contains filtered or unexported fields
}

func (*IntegrationService) Create

func (s *IntegrationService) Create(domain string, ops *IntegrationOps) (*Integration, *http.Response, error)

func (*IntegrationService) Delete

func (s *IntegrationService) Delete(domain string, hashId string) (*http.Response, error)

func (*IntegrationService) Get

func (s *IntegrationService) Get(domain string, hashId string) (*Integration, *http.Response, error)

func (*IntegrationService) GetList

func (s *IntegrationService) GetList(domain string) (*Integrations, *http.Response, error)

func (*IntegrationService) Update

func (s *IntegrationService) Update(domain string, hashId string, ops *IntegrationOps) (*Integration, *http.Response, error)

type Integrations

type Integrations struct {
	Url          string         `json:"url"`
	Integrations []*Integration `json:"integrations"`
}

type LoggingHttpTransport added in v1.11.2

type LoggingHttpTransport struct {
	// contains filtered or unexported fields
}

func NewLoggingHttpTransport added in v1.11.2

func NewLoggingHttpTransport(t http.RoundTripper) *LoggingHttpTransport

func (*LoggingHttpTransport) Log added in v1.11.2

func (t *LoggingHttpTransport) Log(msg string, a ...any)

func (*LoggingHttpTransport) LogReq added in v1.11.2

func (t *LoggingHttpTransport) LogReq(req *http.Request)

func (*LoggingHttpTransport) LogRes added in v1.11.2

func (t *LoggingHttpTransport) LogRes(res *http.Response)

func (*LoggingHttpTransport) RoundTrip added in v1.11.2

func (t *LoggingHttpTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Member

type Member struct {
	Url                       string `json:"url"`
	HtmlUrl                   string `json:"html_url"`
	Id                        int    `json:"id"`
	Name                      string `json:"name"`
	Email                     string `json:"email"`
	AvatarUrl                 string `json:"avatar_url"`
	AutoAssignToNewProjects   bool   `json:"auto_assign_to_new_projects"`
	AutoAssignPermissionSetId int    `json:"auto_assign_permission_set_id"`
	Status                    string `json:"status"`
	Admin                     bool   `json:"admin"`
	WorkspaceOwner            bool   `json:"workspace_owner"`
}

type MemberCreateOps added in v1.1.0

type MemberCreateOps struct {
	Email *string `json:"email"`
}

type MemberService

type MemberService struct {
	// contains filtered or unexported fields
}

func (*MemberService) Create

func (s *MemberService) Create(domain string, ops *MemberCreateOps) (*Member, *http.Response, error)

func (*MemberService) Delete

func (s *MemberService) Delete(domain string, memberId int) (*http.Response, error)

func (*MemberService) Get

func (s *MemberService) Get(domain string, memberId int) (*Member, *http.Response, error)

func (*MemberService) GetList

func (s *MemberService) GetList(domain string, query *PageQuery) (*Members, *http.Response, error)

func (*MemberService) GetListAll

func (s *MemberService) GetListAll(domain string) (*Members, *http.Response, error)

func (*MemberService) Update added in v1.1.0

func (s *MemberService) Update(domain string, memberId int, ops *MemberUpdateOps) (*Member, *http.Response, error)

type MemberUpdateOps added in v1.1.0

type MemberUpdateOps struct {
	Admin                     *bool `json:"admin,omitempty"`
	AutoAssignToNewProjects   *bool `json:"auto_assign_to_new_projects,omitempty"`
	AutoAssignPermissionSetId *int  `json:"auto_assign_permission_set_id,omitempty"`
}

type Members

type Members struct {
	Url     string    `json:"url"`
	HtmlUrl string    `json:"html_url"`
	Members []*Member `json:"members"`
}

type PageQuery

type PageQuery struct {
	Page    int `url:"page"`
	PerPage int `url:"per_page"`
}

type Permission

type Permission struct {
	Url                    string `json:"url"`
	HtmlUrl                string `json:"html_url"`
	Id                     int    `json:"id"`
	Name                   string `json:"name"`
	Description            string `json:"description"`
	Type                   string `json:"type"`
	RepositoryAccessLevel  string `json:"repository_access_level"`
	PipelineAccessLevel    string `json:"pipeline_access_level"`
	SandboxAccessLevel     string `json:"sandbox_access_level"`
	ProjectTeamAccessLevel string `json:"project_team_access_level"`
}

type PermissionOps

type PermissionOps struct {
	Description            *string `json:"description,omitempty"`
	Name                   *string `json:"name"`
	PipelineAccessLevel    *string `json:"pipeline_access_level"`
	ProjectTeamAccessLevel *string `json:"project_team_access_level"`
	RepositoryAccessLevel  *string `json:"repository_access_level"`
	SandboxAccessLevel     *string `json:"sandbox_access_level"`
}

type PermissionService

type PermissionService struct {
	// contains filtered or unexported fields
}

func (*PermissionService) Create

func (s *PermissionService) Create(domain string, ops *PermissionOps) (*Permission, *http.Response, error)

func (*PermissionService) Delete

func (s *PermissionService) Delete(domain string, permissionId int) (*http.Response, error)

func (*PermissionService) Get

func (s *PermissionService) Get(domain string, permissionId int) (*Permission, *http.Response, error)

func (*PermissionService) GetList

func (s *PermissionService) GetList(domain string) (*Permissions, *http.Response, error)

func (*PermissionService) Update

func (s *PermissionService) Update(domain string, permissionId int, ops *PermissionOps) (*Permission, *http.Response, error)

type Permissions

type Permissions struct {
	HtmlUrl        string        `json:"html_url"`
	Url            string        `json:"url"`
	PermissionSets []*Permission `json:"permission_sets"`
}

type Pipeline

type Pipeline struct {
	Url                       string                      `json:"url"`
	HtmlUrl                   string                      `json:"html_url"`
	Id                        int                         `json:"id"`
	Name                      string                      `json:"name"`
	On                        string                      `json:"on"`
	Refs                      []string                    `json:"refs"`
	Events                    []*PipelineEvent            `json:"events"`
	TriggerConditions         []*PipelineTriggerCondition `json:"trigger_conditions"`
	ExecutionMessageTemplate  string                      `json:"execution_message_template"`
	LastExecutionStatus       string                      `json:"last_execution_status"`
	LastExecutionRevision     string                      `json:"last_execution_revision"`
	CreateDate                string                      `json:"create_date"`
	Priority                  string                      `json:"priority"`
	AlwaysFromScratch         bool                        `json:"always_from_scratch"`
	FailOnPrepareEnvWarning   bool                        `json:"fail_on_prepare_env_warning"`
	FetchAllRefs              bool                        `json:"fetch_all_refs"`
	AutoClearCache            bool                        `json:"auto_clear_cache"`
	NoSkipToMostRecent        bool                        `json:"no_skip_to_most_recent"`
	DoNotCreateCommitStatus   bool                        `json:"do_not_create_commit_status"`
	IgnoreFailOnProjectStatus bool                        `json:"ignore_fail_on_project_status"`
	StartDate                 string                      `json:"start_date"`
	Delay                     int                         `json:"delay"`
	CloneDepth                int                         `json:"clone_depth"`
	Cron                      string                      `json:"cron"`
	Paused                    bool                        `json:"paused"`
	Worker                    string                      `json:"worker"`
	TargetSiteUrl             string                      `json:"target_site_url"`
	Tags                      []string                    `json:"tags"`
	Project                   *Project                    `json:"project"`
	Creator                   *Member                     `json:"creator"`
	GitConfigRef              string                      `json:"git_config_ref"`
	GitConfig                 *PipelineGitConfig          `json:"git_config"`
	DefinitionSource          string                      `json:"definition_source"`
	RemotePath                string                      `json:"remote_path"`
	RemoteBranch              string                      `json:"remote_branch"`
	RemoteProjectName         string                      `json:"remote_project_name"`
	RemoteParameters          []*PipelineRemoteParameter  `json:"remote_parameters"`
	Disabled                  bool                        `json:"disabled"`
	DisabledReason            string                      `json:"disabled_reason"`
	Permissions               *PipelinePermissions        `json:"permissions"`
}

type PipelineEvent

type PipelineEvent struct {
	Type string   `json:"type"`
	Refs []string `json:"refs"`
}

type PipelineGitConfig added in v1.15.0

type PipelineGitConfig struct {
	Path    string `json:"path"`
	Branch  string `json:"branch"`
	Project string `json:"project"`
}

type PipelineOps

type PipelineOps struct {
	Name                      *string                      `json:"name,omitempty"`
	On                        *string                      `json:"on,omitempty"`
	Refs                      *[]string                    `json:"refs,omitempty"`
	Tags                      *[]string                    `json:"tags,omitempty"`
	Events                    *[]*PipelineEvent            `json:"events,omitempty"`
	TriggerConditions         *[]*PipelineTriggerCondition `json:"trigger_conditions,omitempty"`
	AlwaysFromScratch         *bool                        `json:"always_from_scratch,omitempty"`
	Priority                  *string                      `json:"priority,omitempty"`
	FailOnPrepareEnvWarning   *bool                        `json:"fail_on_prepare_env_warning,omitempty"`
	FetchAllRefs              *bool                        `json:"fetch_all_refs,omitempty"`
	AutoClearCache            *bool                        `json:"auto_clear_cache,omitempty"`
	NoSkipToMostRecent        *bool                        `json:"no_skip_to_most_recent,omitempty"`
	DoNotCreateCommitStatus   *bool                        `json:"do_not_create_commit_status,omitempty"`
	StartDate                 *string                      `json:"start_date,omitempty"`
	Delay                     *int                         `json:"delay,omitempty"`
	CloneDepth                *int                         `json:"clone_depth,omitempty"`
	Cron                      *string                      `json:"cron,omitempty"`
	Paused                    *bool                        `json:"paused,omitempty"`
	IgnoreFailOnProjectStatus *bool                        `json:"ignore_fail_on_project_status,omitempty"`
	ExecutionMessageTemplate  *string                      `json:"execution_message_template,omitempty"`
	Worker                    *string                      `json:"worker,omitempty"`
	TargetSiteUrl             *string                      `json:"target_site_url,omitempty"`
	GitConfigRef              *string                      `json:"git_config_ref,omitempty"`
	GitConfig                 *PipelineGitConfig           `json:"git_config,omitempty"`
	DefinitionSource          *string                      `json:"definition_source,omitempty"`
	RemotePath                *string                      `json:"remote_path,omitempty"`
	RemoteBranch              *string                      `json:"remote_branch,omitempty"`
	RemoteProjectName         *string                      `json:"remote_project_name,omitempty"`
	RemoteParameters          *[]*PipelineRemoteParameter  `json:"remote_parameters,omitempty"`
	Disabled                  *bool                        `json:"disabled,omitempty"`
	DisabledReason            *string                      `json:"disabled_reason,omitempty"`
	Permissions               *PipelinePermissions         `json:"permissions,omitempty"`
}

type PipelinePermissions added in v1.8.0

type PipelinePermissions struct {
	Others string                        `json:"others"`
	Users  []*PipelineResourcePermission `json:"users"`
	Groups []*PipelineResourcePermission `json:"groups"`
}

type PipelineRemoteParameter

type PipelineRemoteParameter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type PipelineResourcePermission added in v1.8.0

type PipelineResourcePermission struct {
	Id          int    `json:"id"`
	AccessLevel string `json:"access_level"`
}

type PipelineService

type PipelineService struct {
	// contains filtered or unexported fields
}

func (*PipelineService) Create

func (s *PipelineService) Create(domain string, projectName string, ops *PipelineOps) (*Pipeline, *http.Response, error)

func (*PipelineService) Delete

func (s *PipelineService) Delete(domain string, projectName string, pipelineId int) (*http.Response, error)

func (*PipelineService) Get

func (s *PipelineService) Get(domain string, projectName string, pipelineId int) (*Pipeline, *http.Response, error)

func (*PipelineService) GetList

func (s *PipelineService) GetList(domain string, projectName string, query *PageQuery) (*Pipelines, *http.Response, error)

func (*PipelineService) GetListAll

func (s *PipelineService) GetListAll(domain string, projectName string) (*Pipelines, *http.Response, error)

func (*PipelineService) Update

func (s *PipelineService) Update(domain string, projectName string, pipelineId int, ops *PipelineOps) (*Pipeline, *http.Response, error)

type PipelineTriggerCondition

type PipelineTriggerCondition struct {
	TriggerCondition      string   `json:"trigger_condition"`
	TriggerConditionPaths []string `json:"trigger_condition_paths"`
	TriggerVariableKey    string   `json:"trigger_variable_key"`
	TriggerVariableValue  string   `json:"trigger_variable_value"`
	TriggerHours          []int    `json:"trigger_hours"`
	TriggerDays           []int    `json:"trigger_days"`
	ZoneId                string   `json:"zone_id"`
	TriggerProjectName    string   `json:"trigger_project_name"`
	TriggerPipelineName   string   `json:"trigger_pipeline_name"`
	TriggerUser           string   `json:"trigger_user"`
	TriggerGroup          string   `json:"trigger_group"`
}

type Pipelines

type Pipelines struct {
	Url       string      `json:"url"`
	HtmlUrl   string      `json:"html_url"`
	Pipelines []*Pipeline `json:"pipelines"`
}

type Profile

type Profile struct {
	Url           string `json:"url"`
	HtmlUrl       string `json:"html_url"`
	Id            int    `json:"id"`
	Name          string `json:"name"`
	AvatarUrl     string `json:"avatar_url"`
	WorkspacesUrl string `json:"workspaces_url"`
}

type ProfileEmail

type ProfileEmail struct {
	Email     string `json:"email"`
	Confirmed bool   `json:"confirmed"`
}

type ProfileEmailOps

type ProfileEmailOps struct {
	Email *string `json:"email"`
}

type ProfileEmailService

type ProfileEmailService struct {
	// contains filtered or unexported fields
}

func (*ProfileEmailService) Create

func (*ProfileEmailService) Delete

func (s *ProfileEmailService) Delete(email string) (*http.Response, error)

func (*ProfileEmailService) GetList

type ProfileEmailSet

type ProfileEmailSet struct {
	Emails []*ProfileEmail `json:"emails"`
}

type ProfileOps

type ProfileOps struct {
	Name *string `json:"name"`
}

type ProfileService

type ProfileService struct {
	// contains filtered or unexported fields
}

func (*ProfileService) Get

func (s *ProfileService) Get() (*Profile, *http.Response, error)

func (*ProfileService) Update

func (s *ProfileService) Update(ops *ProfileOps) (*Profile, *http.Response, error)

type Project

type Project struct {
	Url                             string  `json:"url"`
	HtmlUrl                         string  `json:"html_url"`
	Name                            string  `json:"name"`
	DisplayName                     string  `json:"display_name"`
	Status                          string  `json:"status"`
	CreateDate                      string  `json:"create_date"`
	CreatedBy                       *Member `json:"created_by"`
	HttpRepository                  string  `json:"http_repository"`
	SshRepository                   string  `json:"ssh_repository"`
	DefaultBranch                   string  `json:"default_branch"`
	UpdateDefaultBranchFromExternal bool    `json:"update_default_branch_from_external"`
	FetchSubmodules                 bool    `json:"fetch_submodules"`
	FetchSubmodulesEnvKey           string  `json:"fetch_submodules_env_key"`
	Access                          string  `json:"access"`
	AllowPullRequests               bool    `json:"allow_pull_requests"`
	WithoutRepository               bool    `json:"without_repository,omitempty"`
}

type ProjectCreateOps

type ProjectCreateOps struct {
	Name                            *string             `json:"name,omitempty"`
	DisplayName                     *string             `json:"display_name,omitempty"`
	ExternalProjectId               *string             `json:"external_project_id,omitempty"`
	GitLabProjectId                 *string             `json:"git_lab_project_id,omitempty"`
	CustomRepoUrl                   *string             `json:"custom_repo_url,omitempty"`
	CustomRepoUser                  *string             `json:"custom_repo_user,omitempty"`
	CustomRepoPass                  *string             `json:"custom_repo_pass,omitempty"`
	CustomRepoSshKeyId              *int                `json:"custom_repo_ssh_key_id,omitempty"`
	UpdateDefaultBranchFromExternal *bool               `json:"update_default_branch_from_external,omitempty"`
	Integration                     *ProjectIntegration `json:"integration,omitempty"`
	FetchSubmodules                 *bool               `json:"fetch_submodules,omitempty"`
	FetchSubmodulesEnvKey           *string             `json:"fetch_submodules_env_key,omitempty"`
	Access                          *string             `json:"access,omitempty"`
	AllowPullRequests               *bool               `json:"allow_pull_requests,omitempty"`
	WithoutRepository               *bool               `json:"without_repository,omitempty"`
}

type ProjectGroup

type ProjectGroup struct {
	Group
	PermissionSet *Permission `json:"permission_set"`
}

type ProjectGroupOps

type ProjectGroupOps struct {
	Id            *int             `json:"id,omitempty"`
	PermissionSet *ProjectGroupOps `json:"permission_set,omitempty"`
}

type ProjectGroupService

type ProjectGroupService struct {
	// contains filtered or unexported fields
}

func (*ProjectGroupService) CreateProjectGroup

func (s *ProjectGroupService) CreateProjectGroup(domain string, projectName string, ops *ProjectGroupOps) (*ProjectGroup, *http.Response, error)

func (*ProjectGroupService) DeleteProjectGroup

func (s *ProjectGroupService) DeleteProjectGroup(domain string, projectName string, groupId int) (*http.Response, error)

func (*ProjectGroupService) GetProjectGroup

func (s *ProjectGroupService) GetProjectGroup(domain string, projectName string, groupId int) (*ProjectGroup, *http.Response, error)

func (*ProjectGroupService) GetProjectGroups

func (s *ProjectGroupService) GetProjectGroups(domain string, projectName string) (*Groups, *http.Response, error)

func (*ProjectGroupService) UpdateProjectGroup

func (s *ProjectGroupService) UpdateProjectGroup(domain string, projectName string, groupId int, ops *ProjectGroupOps) (*ProjectGroup, *http.Response, error)

type ProjectIntegration

type ProjectIntegration struct {
	HashId string `json:"hash_id"`
}

type ProjectListQuery

type ProjectListQuery struct {
	PageQuery
	Membership bool   `url:"membership,omitempty"`
	Status     string `url:"status,omitempty"`
}

type ProjectMember

type ProjectMember struct {
	Member
	PermissionSet *Permission `json:"permission_set"`
}

type ProjectMemberOps

type ProjectMemberOps struct {
	Id            *int              `json:"id,omitempty"`
	PermissionSet *ProjectMemberOps `json:"permission_set,omitempty"`
}

type ProjectMemberService

type ProjectMemberService struct {
	// contains filtered or unexported fields
}

func (*ProjectMemberService) CreateProjectMember

func (s *ProjectMemberService) CreateProjectMember(domain string, projectName string, ops *ProjectMemberOps) (*ProjectMember, *http.Response, error)

func (*ProjectMemberService) DeleteProjectMember

func (s *ProjectMemberService) DeleteProjectMember(domain string, projectName string, memberId int) (*http.Response, error)

func (*ProjectMemberService) GetProjectMember

func (s *ProjectMemberService) GetProjectMember(domain string, projectName string, memberId int) (*ProjectMember, *http.Response, error)

func (*ProjectMemberService) GetProjectMembers

func (s *ProjectMemberService) GetProjectMembers(domain string, projectName string, query *PageQuery) (*Members, *http.Response, error)

func (*ProjectMemberService) GetProjectMembersAll

func (s *ProjectMemberService) GetProjectMembersAll(domain string, projectName string) (*Members, *http.Response, error)

func (*ProjectMemberService) UpdateProjectMember

func (s *ProjectMemberService) UpdateProjectMember(domain string, projectName string, memberId int, ops *ProjectMemberOps) (*ProjectMember, *http.Response, error)

type ProjectService

type ProjectService struct {
	// contains filtered or unexported fields
}

func (*ProjectService) Create

func (s *ProjectService) Create(domain string, ops *ProjectCreateOps) (*Project, *http.Response, error)

func (*ProjectService) Delete

func (s *ProjectService) Delete(domain string, projectName string) (*http.Response, error)

func (*ProjectService) Get

func (s *ProjectService) Get(domain string, projectName string) (*Project, *http.Response, error)

func (*ProjectService) GetList

func (s *ProjectService) GetList(domain string, query *ProjectListQuery) (*Projects, *http.Response, error)

func (*ProjectService) GetListAll

func (s *ProjectService) GetListAll(domain string, query *ProjectListQuery) (*Projects, *http.Response, error)

func (*ProjectService) Update

func (s *ProjectService) Update(domain string, projectName string, ops *ProjectUpdateOps) (*Project, *http.Response, error)

type ProjectUpdateOps

type ProjectUpdateOps struct {
	DisplayName                     *string `json:"display_name,omitempty"`
	Name                            *string `json:"name,omitempty"`
	UpdateDefaultBranchFromExternal *bool   `json:"update_default_branch_from_external,omitempty"`
	FetchSubmodules                 *bool   `json:"fetch_submodules,omitempty"`
	FetchSubmodulesEnvKey           *string `json:"fetch_submodules_env_key,omitempty"`
	Access                          *string `json:"access,omitempty"`
	AllowPullRequests               *bool   `json:"allow_pull_requests,omitempty"`
}

type Projects

type Projects struct {
	Url      string     `json:"url"`
	HtmlUrl  string     `json:"html_url"`
	Projects []*Project `json:"projects"`
}

type PublicKey

type PublicKey struct {
	Url     string `json:"url"`
	HtmlUrl string `json:"html_url"`
	Id      int    `json:"id"`
	Title   string `json:"title"`
	Content string `json:"content"`
}

type PublicKeyOps

type PublicKeyOps struct {
	Content *string `json:"content"`
	Title   *string `json:"title,omitempty"`
}

type PublicKeyService

type PublicKeyService struct {
	// contains filtered or unexported fields
}

func (*PublicKeyService) Create

func (s *PublicKeyService) Create(ops *PublicKeyOps) (*PublicKey, *http.Response, error)

func (*PublicKeyService) Delete

func (s *PublicKeyService) Delete(keyId int) (*http.Response, error)

func (*PublicKeyService) Get

func (s *PublicKeyService) Get(keyId int) (*PublicKey, *http.Response, error)

type RoleAssumption

type RoleAssumption struct {
	Arn        string `json:"arn"`
	ExternalId string `json:"external_id,omitempty"`
	Duration   int    `json:"duration,omitempty"`
}

type SourceCommit

type SourceCommit struct {
	Url        string  `json:"url"`
	HtmlUrl    string  `json:"html_url"`
	Revision   string  `json:"revision"`
	AuthorDate string  `json:"author_date"`
	CommitDate string  `json:"commit_date"`
	Message    string  `json:"message"`
	Committer  *Member `json:"committer"`
	Author     *Member `json:"author"`
}

type SourceContent

type SourceContent struct {
	Url         string `json:"url"`
	HtmlUrl     string `json:"html_url"`
	ContentType string `json:"content_type"`
	Encoding    string `json:"encoding"`
	Size        int    `json:"size"`
	Name        string `json:"name"`
	Path        string `json:"path"`
	Content     string `json:"content"`
}

type SourceContents

type SourceContents struct {
	SourceContent
	Contents []*SourceContent `json:"contents"`
}

type SourceContentsGetQuery

type SourceContentsGetQuery struct {
	Revision string `json:"revision,omitempty"`
}

type SourceFile

type SourceFile struct {
	Content *SourceContent `json:"content"`
	Commit  *SourceCommit  `json:"commit"`
}

type SourceFileOps

type SourceFileOps struct {
	Content    *string `json:"content,omitempty"`
	ContentRaw *string `json:"content_raw,omitempty"`
	Message    *string `json:"message,omitempty"`
	Path       *string `json:"path,omitempty"`
	Branch     *string `json:"branch,omitempty"`
}

type SourceService

type SourceService struct {
	// contains filtered or unexported fields
}

func (*SourceService) CreateFile

func (s *SourceService) CreateFile(domain string, projectName string, ops *SourceFileOps) (*SourceFile, *http.Response, error)

func (*SourceService) DeleteFile

func (s *SourceService) DeleteFile(domain string, projectName string, path string, ops *SourceFileOps) (*http.Response, error)

func (*SourceService) Get

func (s *SourceService) Get(domain string, projectName string, path string, query *SourceContentsGetQuery) (*SourceContents, *http.Response, error)

func (*SourceService) UpdateFile

func (s *SourceService) UpdateFile(domain string, projectName string, path string, ops *SourceFileOps) (*SourceFile, *http.Response, error)

type Sso added in v1.9.0

type Sso struct {
	Url                     string `json:"url"`
	HtmlUrl                 string `json:"html_url"`
	Type                    string `json:"type"`
	SsoUrl                  string `json:"sso_url"`
	Issuer                  string `json:"issuer"`
	Certificate             string `json:"certificate"`
	SignatureMethod         string `json:"signature_method"`
	DigestMethod            string `json:"digest_method"`
	RequireSsoForAllMembers bool   `json:"require_sso_for_all_members"`
}

type SsoService added in v1.9.0

type SsoService struct {
	// contains filtered or unexported fields
}

func (*SsoService) Disable added in v1.9.0

func (s *SsoService) Disable(domain string) (*http.Response, error)

func (*SsoService) Enable added in v1.9.0

func (s *SsoService) Enable(domain string) (*http.Response, error)

func (*SsoService) Get added in v1.9.0

func (s *SsoService) Get(domain string) (*Sso, *http.Response, error)

func (*SsoService) Update added in v1.9.0

func (s *SsoService) Update(domain string, ops *SsoUpdateOps) (*Sso, *http.Response, error)

type SsoUpdateOps added in v1.9.0

type SsoUpdateOps struct {
	SsoUrl                  *string `json:"sso_url,omitempty"`
	Issuer                  *string `json:"issuer,omitempty"`
	Type                    *string `json:"type,omitempty"`
	ClientId                *string `json:"client_id"`
	ClientSecret            *string `json:"client_secret"`
	Certificate             *string `json:"certificate,omitempty"`
	SignatureMethod         *string `json:"signature_method,omitempty"`
	DigestMethod            *string `json:"digest_method,omitempty"`
	RequireSsoForAllMembers *bool   `json:"require_sso_for_all_members,omitempty"`
}

type Token added in v1.10.0

type Token struct {
	Url                   string   `json:"url"`
	HtmlUrl               string   `json:"html_url"`
	Id                    string   `json:"id"`
	Name                  string   `json:"name"`
	Token                 string   `json:"token"`
	ExpiresAt             string   `json:"expires_at"`
	Scopes                []string `json:"scopes"`
	IpRestrictions        []string `json:"ip_restrictions"`
	WorkspaceRestrictions []string `json:"workspace_restrictions"`
}

type TokenOps added in v1.10.0

type TokenOps struct {
	Name                  *string   `json:"name,omitempty"`
	ExpiresIn             *int      `json:"expires_in,omitempty"`
	ExpiresAt             *string   `json:"expires_at,omitempty"`
	Scopes                *[]string `json:"scopes,omitempty"`
	IpRestrictions        *[]string `json:"ip_restrictions,omitempty"`
	WorkspaceRestrictions *[]string `json:"workspace_restrictions,omitempty"`
}

type TokenService added in v1.10.0

type TokenService struct {
	// contains filtered or unexported fields
}

func (*TokenService) Create added in v1.10.0

func (s *TokenService) Create(ops *TokenOps) (*Token, *http.Response, error)

func (*TokenService) Delete added in v1.10.0

func (s *TokenService) Delete(tokenId string) (*http.Response, error)

func (*TokenService) Get added in v1.10.0

func (s *TokenService) Get(tokenId string) (*Token, *http.Response, error)

func (*TokenService) GetList added in v1.10.0

func (s *TokenService) GetList() (*Tokens, *http.Response, error)

func (*TokenService) GetMe added in v1.10.3

func (s *TokenService) GetMe() (*Token, *http.Response, error)

type Tokens added in v1.10.0

type Tokens struct {
	Url          string   `json:"url"`
	HtmlUrl      string   `json:"html_url"`
	AccessTokens []*Token `json:"access_tokens"`
}

type UrlPath

type UrlPath struct {
	Path   string
	Params []interface{}
}

func (*UrlPath) Compute

func (u *UrlPath) Compute() string

type Variable

type Variable struct {
	Id             int    `json:"id"`
	Key            string `json:"key"`
	Value          string `json:"value"`
	Type           string `json:"type"`
	Encrypted      bool   `json:"encrypted"`
	Settable       bool   `json:"settable"`
	Description    string `json:"description"`
	FilePath       string `json:"file_path"`
	FileChmod      string `json:"file_chmod"`
	FilePlace      string `json:"file_place"`
	PublicValue    string `json:"public_value"`
	KeyFingerprint string `json:"key_fingerprint"`
	Checksum       string `json:"checksum"`
}

type VariableAction

type VariableAction struct {
	Id int `json:"id"`
}

type VariableGetListQuery

type VariableGetListQuery struct {
	ProjectName string `url:"projectName,omitempty"`
	PipelineId  int    `url:"pipelineId,omitempty"`
	ActionId    int    `url:"actionId,omitempty"`
}

type VariableOps

type VariableOps struct {
	Key         *string           `json:"key,omitempty"`
	Value       *string           `json:"value,omitempty"`
	Type        *string           `json:"type,omitempty"`
	Description *string           `json:"description,omitempty"`
	Settable    *bool             `json:"settable,omitempty"`
	Encrypted   *bool             `json:"encrypted,omitempty"`
	Project     *VariableProject  `json:"project,omitempty"`
	Pipeline    *VariablePipeline `json:"pipeline,omitempty"`
	Action      *VariableAction   `json:"action,omitempty"`
	FilePlace   *string           `json:"file_place,omitempty"`
	FilePath    *string           `json:"file_path,omitempty"`
	FileChmod   *string           `json:"file_chmod,omitempty"`
}

type VariablePipeline

type VariablePipeline struct {
	Id int `json:"id"`
}

type VariableProject

type VariableProject struct {
	Name string `json:"name"`
}

type VariableService

type VariableService struct {
	// contains filtered or unexported fields
}

func (*VariableService) Create

func (s *VariableService) Create(domain string, ops *VariableOps) (*Variable, *http.Response, error)

func (*VariableService) Delete

func (s *VariableService) Delete(domain string, variableId int) (*http.Response, error)

func (*VariableService) Get

func (s *VariableService) Get(domain string, variableId int) (*Variable, *http.Response, error)

func (*VariableService) GetList

func (s *VariableService) GetList(domain string, query *VariableGetListQuery) (*Variables, *http.Response, error)

func (*VariableService) Update

func (s *VariableService) Update(domain string, variableId int, ops *VariableOps) (*Variable, *http.Response, error)

type Variables

type Variables struct {
	Url       string      `json:"url"`
	HtmlUrl   string      `json:"html_url"`
	Variables []*Variable `json:"variables"`
}

type Webhook

type Webhook struct {
	Url       string            `json:"url"`
	HtmlUrl   string            `json:"html_url"`
	Id        int               `json:"id"`
	TargetUrl string            `json:"target_url"`
	SecretKey string            `json:"secret_key"`
	Projects  []string          `json:"projects"`
	Events    []string          `json:"events"`
	Requests  []*WebhookRequest `json:"requests"`
}

type WebhookOps

type WebhookOps struct {
	Events    *[]string `json:"events,omitempty"`
	Projects  *[]string `json:"projects,omitempty"`
	TargetUrl *string   `json:"target_url,omitempty"`
	SecretKey *string   `json:"secret_key,omitempty"`
}

type WebhookRequest

type WebhookRequest struct {
	PostDate       string `json:"post_date"`
	ResponseStatus string `json:"response_status"`
	Body           string `json:"body"`
}

type WebhookService

type WebhookService struct {
	// contains filtered or unexported fields
}

func (*WebhookService) Create

func (s *WebhookService) Create(domain string, ops *WebhookOps) (*Webhook, *http.Response, error)

func (*WebhookService) Delete

func (s *WebhookService) Delete(domain string, webhookId int) (*http.Response, error)

func (*WebhookService) Get

func (s *WebhookService) Get(domain string, webhookId int) (*Webhook, *http.Response, error)

func (*WebhookService) GetList

func (s *WebhookService) GetList(domain string) (*Webhooks, *http.Response, error)

func (*WebhookService) Update

func (s *WebhookService) Update(domain string, webhookId int, ops *WebhookOps) (*Webhook, *http.Response, error)

type Webhooks

type Webhooks struct {
	Url      string     `json:"url"`
	HtmlUrl  string     `json:"html_url"`
	Webhooks []*Webhook `json:"webhooks"`
}

type Workspace

type Workspace struct {
	Url        string `json:"url"`
	HtmlUrl    string `json:"html_url"`
	Id         int    `json:"id"`
	OwnerId    int    `json:"owner_id"`
	Name       string `json:"name"`
	Domain     string `json:"domain"`
	Frozen     bool   `json:"frozen"`
	CreateDate string `json:"create_date"`
}

type WorkspaceCreateOps

type WorkspaceCreateOps struct {
	EncryptionSalt *string `json:"encryption_salt,omitempty"`
	Name           *string `json:"name,omitempty"`
	Domain         *string `json:"domain,omitempty"`
}

type WorkspaceService

type WorkspaceService struct {
	// contains filtered or unexported fields
}

func (*WorkspaceService) Create

func (*WorkspaceService) Delete

func (s *WorkspaceService) Delete(domain string) (*http.Response, error)

func (*WorkspaceService) Get

func (s *WorkspaceService) Get(domain string) (*Workspace, *http.Response, error)

func (*WorkspaceService) GetList

func (s *WorkspaceService) GetList() (*Workspaces, *http.Response, error)

func (*WorkspaceService) Update

func (s *WorkspaceService) Update(domain string, ops *WorkspaceUpdateOps) (*Workspace, *http.Response, error)

type WorkspaceUpdateOps

type WorkspaceUpdateOps struct {
	EncryptionSalt *string `json:"encryption_salt,omitempty"`
	Name           *string `json:"name,omitempty"`
}

type Workspaces

type Workspaces struct {
	Url        string       `json:"url"`
	HtmlUrl    string       `json:"html_url"`
	Workspaces []*Workspace `json:"workspaces"`
}

Jump to

Keyboard shortcuts

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