Documentation
¶
Overview ¶
Package library provides the defined library types for Vela.
Usage:
import "github.com/go-vela/types/library"
Index ¶
- func BuildWithContext(c context.Context, b *Build) context.Context
- func LogWithContext(c context.Context, l *Log) context.Context
- func RepoWithContext(c context.Context, r *Repo) context.Context
- func SecretWithContext(c context.Context, s *Secret) context.Context
- func StepWithContext(c context.Context, s *Step) context.Context
- func UserWithContext(c context.Context, u *User) context.Context
- type Build
- func (b *Build) GetAuthor() string
- func (b *Build) GetBaseRef() string
- func (b *Build) GetBranch() string
- func (b *Build) GetClone() string
- func (b *Build) GetCommit() string
- func (b *Build) GetCreated() int64
- func (b *Build) GetDeploy() string
- func (b *Build) GetDistribution() string
- func (b *Build) GetEnqueued() int64
- func (b *Build) GetError() string
- func (b *Build) GetEvent() string
- func (b *Build) GetFinished() int64
- func (b *Build) GetHost() string
- func (b *Build) GetID() int64
- func (b *Build) GetMessage() string
- func (b *Build) GetNumber() int
- func (b *Build) GetParent() int
- func (b *Build) GetRef() string
- func (b *Build) GetRepoID() int64
- func (b *Build) GetRuntime() string
- func (b *Build) GetSender() string
- func (b *Build) GetSource() string
- func (b *Build) GetStarted() int64
- func (b *Build) GetStatus() string
- func (b *Build) GetTitle() string
- func (b *Build) SetAuthor(v string)
- func (b *Build) SetBaseRef(v string)
- func (b *Build) SetBranch(v string)
- func (b *Build) SetClone(v string)
- func (b *Build) SetCommit(v string)
- func (b *Build) SetCreated(v int64)
- func (b *Build) SetDeploy(v string)
- func (b *Build) SetDistribution(v string)
- func (b *Build) SetEnqueued(v int64)
- func (b *Build) SetError(v string)
- func (b *Build) SetEvent(v string)
- func (b *Build) SetFinished(v int64)
- func (b *Build) SetHost(v string)
- func (b *Build) SetID(v int64)
- func (b *Build) SetMessage(v string)
- func (b *Build) SetNumber(v int)
- func (b *Build) SetParent(v int)
- func (b *Build) SetRef(v string)
- func (b *Build) SetRepoID(v int64)
- func (b *Build) SetRuntime(v string)
- func (b *Build) SetSender(v string)
- func (b *Build) SetSource(v string)
- func (b *Build) SetStarted(v int64)
- func (b *Build) SetStatus(v string)
- func (b *Build) SetTitle(v string)
- func (b *Build) String() string
- type Log
- func (l *Log) GetBuildID() int64
- func (l *Log) GetData() []byte
- func (l *Log) GetID() int64
- func (l *Log) GetRepoID() int64
- func (l *Log) GetServiceID() int64
- func (l *Log) GetStepID() int64
- func (l *Log) SetBuildID(v int64)
- func (l *Log) SetData(v []byte)
- func (l *Log) SetID(v int64)
- func (l *Log) SetRepoID(v int64)
- func (l *Log) SetServiceID(v int64)
- func (l *Log) SetStepID(v int64)
- func (l *Log) String() string
- type Login
- func (l *Login) GetOTP() string
- func (l *Login) GetPassword() string
- func (l *Login) GetToken() string
- func (l *Login) GetUsername() string
- func (l *Login) SetOTP(v string)
- func (l *Login) SetPassword(v string)
- func (l *Login) SetToken(v string)
- func (l *Login) SetUsername(v string)
- func (l *Login) String() string
- type Repo
- func (r *Repo) GetActive() bool
- func (r *Repo) GetAllowDeploy() bool
- func (r *Repo) GetAllowPull() bool
- func (r *Repo) GetAllowPush() bool
- func (r *Repo) GetAllowTag() bool
- func (r *Repo) GetBranch() string
- func (r *Repo) GetClone() string
- func (r *Repo) GetFullName() string
- func (r *Repo) GetID() int64
- func (r *Repo) GetLink() string
- func (r *Repo) GetName() string
- func (r *Repo) GetOrg() string
- func (r *Repo) GetPrivate() bool
- func (r *Repo) GetTimeout() int64
- func (r *Repo) GetTrusted() bool
- func (r *Repo) GetUserID() int64
- func (r *Repo) GetVisibility() string
- func (r *Repo) SetActive(v bool)
- func (r *Repo) SetAllowDeploy(v bool)
- func (r *Repo) SetAllowPull(v bool)
- func (r *Repo) SetAllowPush(v bool)
- func (r *Repo) SetAllowTag(v bool)
- func (r *Repo) SetBranch(v string)
- func (r *Repo) SetClone(v string)
- func (r *Repo) SetFullName(v string)
- func (r *Repo) SetID(v int64)
- func (r *Repo) SetLink(v string)
- func (r *Repo) SetName(v string)
- func (r *Repo) SetOrg(v string)
- func (r *Repo) SetPrivate(v bool)
- func (r *Repo) SetTimeout(v int64)
- func (r *Repo) SetTrusted(v bool)
- func (r *Repo) SetUserID(v int64)
- func (r *Repo) SetVisibility(v string)
- func (r *Repo) String() string
- type Secret
- func (s *Secret) GetEvents() []string
- func (s *Secret) GetID() int64
- func (s *Secret) GetImages() []string
- func (s *Secret) GetName() string
- func (s *Secret) GetOrg() string
- func (s *Secret) GetRepo() string
- func (s *Secret) GetTeam() string
- func (s *Secret) GetType() string
- func (s *Secret) GetValue() string
- func (s *Secret) Match(from *pipeline.Container) bool
- func (s *Secret) Sanitize() *Secret
- func (s *Secret) SetEvents(v []string)
- func (s *Secret) SetID(v int64)
- func (s *Secret) SetImages(v []string)
- func (s *Secret) SetName(v string)
- func (s *Secret) SetOrg(v string)
- func (s *Secret) SetRepo(v string)
- func (s *Secret) SetTeam(v string)
- func (s *Secret) SetType(v string)
- func (s *Secret) SetValue(v string)
- func (s *Secret) String() string
- type Service
- func (s *Service) GetBuildID() int64
- func (s *Service) GetCreated() int64
- func (s *Service) GetError() string
- func (s *Service) GetExitCode() int
- func (s *Service) GetFinished() int64
- func (s *Service) GetID() int64
- func (s *Service) GetName() string
- func (s *Service) GetNumber() int
- func (s *Service) GetRepoID() int64
- func (s *Service) GetStarted() int64
- func (s *Service) GetStatus() string
- func (s *Service) SetBuildID(v int64)
- func (s *Service) SetCreated(v int64)
- func (s *Service) SetError(v string)
- func (s *Service) SetExitCode(v int)
- func (s *Service) SetFinished(v int64)
- func (s *Service) SetID(v int64)
- func (s *Service) SetName(v string)
- func (s *Service) SetNumber(v int)
- func (s *Service) SetRepoID(v int64)
- func (s *Service) SetStarted(v int64)
- func (s *Service) SetStatus(v string)
- func (s *Service) String() string
- type Step
- func (s *Step) GetBuildID() int64
- func (s *Step) GetCreated() int64
- func (s *Step) GetDistribution() string
- func (s *Step) GetError() string
- func (s *Step) GetExitCode() int
- func (s *Step) GetFinished() int64
- func (s *Step) GetHost() string
- func (s *Step) GetID() int64
- func (s *Step) GetName() string
- func (s *Step) GetNumber() int
- func (s *Step) GetRepoID() int64
- func (s *Step) GetRuntime() string
- func (s *Step) GetStage() string
- func (s *Step) GetStarted() int64
- func (s *Step) GetStatus() string
- func (s *Step) SetBuildID(v int64)
- func (s *Step) SetCreated(v int64)
- func (s *Step) SetDistribution(v string)
- func (s *Step) SetError(v string)
- func (s *Step) SetExitCode(v int)
- func (s *Step) SetFinished(v int64)
- func (s *Step) SetHost(v string)
- func (s *Step) SetID(v int64)
- func (s *Step) SetName(v string)
- func (s *Step) SetNumber(v int)
- func (s *Step) SetRepoID(v int64)
- func (s *Step) SetRuntime(v string)
- func (s *Step) SetStage(v string)
- func (s *Step) SetStarted(v int64)
- func (s *Step) SetStatus(v string)
- func (s *Step) String() string
- type User
- func (u *User) GetActive() bool
- func (u *User) GetAdmin() bool
- func (u *User) GetHash() string
- func (u *User) GetID() int64
- func (u *User) GetName() string
- func (u *User) GetToken() string
- func (u *User) SetActive(v bool)
- func (u *User) SetAdmin(v bool)
- func (u *User) SetHash(v string)
- func (u *User) SetID(v int64)
- func (u *User) SetName(v string)
- func (u *User) SetToken(v string)
- func (u *User) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWithContext ¶
BuildWithContext inserts the Build type to the context.
func LogWithContext ¶
LogWithContext inserts the Log type to the context.
func RepoWithContext ¶
RepoWithContext inserts the library Repo type to the context.
func SecretWithContext ¶
SecretWithContext inserts the Secret type to the context.
func StepWithContext ¶
StepWithContext inserts the Step type to the context.
Types ¶
type Build ¶
type Build struct {
ID *int64 `json:"id,omitempty"`
RepoID *int64 `json:"repo_id,omitempty"`
Number *int `json:"number,omitempty"`
Parent *int `json:"parent,omitempty"`
Event *string `json:"event,omitempty"`
Status *string `json:"status,omitempty"`
Error *string `json:"error,omitempty"`
Enqueued *int64 `json:"enqueued,omitempty"`
Created *int64 `json:"created,omitempty"`
Started *int64 `json:"started,omitempty"`
Finished *int64 `json:"finished,omitempty"`
Deploy *string `json:"deploy,omitempty"`
Clone *string `json:"clone,omitempty"`
Source *string `json:"source,omitempty"`
Title *string `json:"title,omitempty"`
Message *string `json:"message,omitempty"`
Commit *string `json:"commit,omitempty"`
Sender *string `json:"sender,omitempty"`
Author *string `json:"author,omitempty"`
Branch *string `json:"branch,omitempty"`
Ref *string `json:"ref,omitempty"`
BaseRef *string `json:"base_ref,omitempty"`
Host *string `json:"host,omitempty"`
Runtime *string `json:"runtime,omitempty"`
Distribution *string `json:"distribution,omitempty"`
}
Build is the library representation of a build for a pipeline.
func BuildFromContext ¶
BuildFromContext retrieves the Build type from the context.
func (*Build) GetAuthor ¶
GetAuthor returns the Author field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetBaseRef ¶
GetBaseRef returns the BaseRef field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetBranch ¶
GetBranch returns the Branch field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetClone ¶
GetClone returns the Clone field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetCommit ¶
GetCommit returns the Commit field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetCreated ¶
GetCreated returns the Created field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetDeploy ¶
GetDeploy returns the Deploy field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetDistribution ¶
GetDistribution returns the Runtime field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetEnqueued ¶
GetEnqueued returns the Enqueued field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetError ¶
GetError returns the Error field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetEvent ¶
GetEvent returns the Event field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetFinished ¶
GetFinished returns the Finished field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetHost ¶
GetHost returns the Host field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetID ¶
GetID returns the ID field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetMessage ¶
GetMessage returns the Message field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetNumber ¶
GetNumber returns the Number field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetParent ¶
GetParent returns the Parent field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetRef ¶
GetRef returns the Ref field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetRepoID ¶
GetRepoID returns the RepoID field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetRuntime ¶
GetRuntime returns the Runtime field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetSender ¶
GetSender returns the Sender field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetSource ¶
GetSource returns the Source field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetStarted ¶
GetStarted returns the Started field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetStatus ¶
GetStatus returns the Status field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) GetTitle ¶
GetTitle returns the Title field.
When the provided Build type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Build) SetAuthor ¶
SetAuthor sets the Author field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetBaseRef ¶
SetBaseRef sets the BaseRef field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetBranch ¶
SetBranch sets the Branch field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetClone ¶
SetClone sets the Clone field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetCommit ¶
SetCommit sets the Commit field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetCreated ¶
SetCreated sets the Created field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetDeploy ¶
SetDeploy sets the Deploy field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetDistribution ¶
SetDistribution sets the Runtime field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetEnqueued ¶
SetEnqueued sets the Enqueued field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetError ¶
SetError sets the Error field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetEvent ¶
SetEvent sets the Event field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetFinished ¶
SetFinished sets the Finished field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetHost ¶
SetHost sets the Host field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetID ¶
SetID sets the ID field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetMessage ¶
SetMessage sets the Message field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetNumber ¶
SetNumber sets the Number field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetParent ¶
SetParent sets the Parent field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetRef ¶
SetRef sets the Ref field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetRepoID ¶
SetRepoID sets the RepoID field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetRuntime ¶
SetRuntime sets the Runtime field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetSender ¶
SetSender sets the Sender field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetSource ¶
SetSource sets the Source field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetStarted ¶
SetStarted sets the Started field.
When the provided Build type is nil, it will set nothing and immediately return.
func (*Build) SetStatus ¶
SetStatus sets the Status field.
When the provided Build type is nil, it will set nothing and immediately return.
type Log ¶
type Log struct {
ID *int64 `json:"id,omitempty"`
BuildID *int64 `json:"build_id,omitempty"`
RepoID *int64 `json:"repo_id,omitempty"`
ServiceID *int64 `json:"service_id,omitempty"`
StepID *int64 `json:"step_id,omitempty"`
Data *[]byte `json:"data,omitempty"`
}
Log is the library representation of a log for a step in a build.
func LogFromContext ¶
LogFromContext retrieves the Log type from the context.
func (*Log) GetBuildID ¶
GetBuildID returns the BuildID field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) GetData ¶
GetData returns the Data field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) GetID ¶
GetID returns the ID field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) GetRepoID ¶
GetRepoID returns the RepoID field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) GetServiceID ¶
GetServiceID returns the ServiceID field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) GetStepID ¶
GetStepID returns the StepID field.
When the provided Log type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Log) SetBuildID ¶
SetBuildID sets the BuildID field.
When the provided Log type is nil, it will set nothing and immediately return.
func (*Log) SetData ¶
SetData sets the Data field.
When the provided Log type is nil, it will set nothing and immediately return.
func (*Log) SetID ¶
SetID sets the ID field.
When the provided Log type is nil, it will set nothing and immediately return.
func (*Log) SetRepoID ¶
SetRepoID sets the RepoID field.
When the provided Log type is nil, it will set nothing and immediately return.
func (*Log) SetServiceID ¶ added in v0.1.2
SetServiceID sets the ServiceID field.
When the provided Log type is nil, it will set nothing and immediately return.
type Login ¶
type Login struct {
Username *string `json:"username,omitempty"`
Password *string `json:"password,omitempty"`
OTP *string `json:"otp,omitempty"`
Token *string `json:"token,omitempty"`
}
Login is the library representation of a user login.
func (*Login) GetOTP ¶
GetOTP returns the Username field.
When the provided Login type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Login) GetPassword ¶
GetPassword returns the Password field.
When the provided Login type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Login) GetToken ¶
GetToken returns the Token field.
When the provided Login type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Login) GetUsername ¶
GetUsername returns the Username field.
When the provided Login type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Login) SetOTP ¶
SetOTP sets the OTP field.
When the provided Login type is nil, it will set nothing and immediately return.
func (*Login) SetPassword ¶
SetPassword sets the Password field.
When the provided Login type is nil, it will set nothing and immediately return.
func (*Login) SetToken ¶
SetToken sets the Token field.
When the provided Login type is nil, it will set nothing and immediately return.
func (*Login) SetUsername ¶
SetUsername sets the Username field.
When the provided Login type is nil, it will set nothing and immediately return.
type Repo ¶
type Repo struct {
ID *int64 `json:"id,omitempty"`
UserID *int64 `json:"user_id,omitempty"`
Org *string `json:"org,omitempty"`
Name *string `json:"name,omitempty"`
FullName *string `json:"full_name,omitempty"`
Link *string `json:"link,omitempty"`
Clone *string `json:"clone,omitempty"`
Branch *string `json:"branch,omitempty"`
Timeout *int64 `json:"timeout,omitempty"`
Visibility *string `json:"visibility,omitempty"`
Private *bool `json:"private,omitempty"`
Trusted *bool `json:"trusted,omitempty"`
Active *bool `json:"active,omitempty"`
AllowPull *bool `json:"allow_pr,omitempty"`
AllowPush *bool `json:"allow_push,omitempty"`
AllowDeploy *bool `json:"allow_deploy,omitempty"`
AllowTag *bool `json:"allow_tag,omitempty"`
}
Repo is the library representation of a repo.
func RepoFromContext ¶
RepoFromContext retrieves the Repo type from the context.
func (*Repo) GetActive ¶
GetActive returns the Active field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetAllowDeploy ¶
GetAllowDeploy returns the AllowDeploy field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetAllowPull ¶
GetAllowPull returns the AllowPull field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetAllowPush ¶
GetAllowPush returns the AllowPush field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetAllowTag ¶
GetAllowTag returns the AllowTag field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetBranch ¶
GetBranch returns the Branch field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetClone ¶
GetClone returns the Clone field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetFullName ¶
GetFullName returns the FullName field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetID ¶
GetID returns the ID field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetLink ¶
GetLink returns the Link field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetName ¶
GetName returns the Name field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetOrg ¶
GetOrg returns the Org field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetPrivate ¶
GetPrivate returns the Private field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetTimeout ¶
GetTimeout returns the Timeout field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetTrusted ¶
GetTrusted returns the Trusted field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetUserID ¶
GetUserID returns the UserID field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) GetVisibility ¶
GetVisibility returns the Visibility field.
When the provided Repo type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Repo) SetActive ¶
SetActive sets the Active field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetAllowDeploy ¶
SetAllowDeploy sets the AllowDeploy field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetAllowPull ¶
SetAllowPull sets the AllowPull field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetAllowPush ¶
SetAllowPush sets the AllowPush field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetAllowTag ¶
SetAllowTag sets the AllowTag field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetBranch ¶
SetBranch sets the Branch field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetClone ¶
SetClone sets the Clone field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetFullName ¶
SetFullName sets the FullName field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetID ¶
SetID sets the ID field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetLink ¶
SetLink sets the Link field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetName ¶
SetName sets the Name field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetOrg ¶
SetOrg sets the Org field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetPrivate ¶
SetPrivate sets the Private field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetTimeout ¶
SetTimeout sets the Timeout field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetTrusted ¶
SetTrusted sets the Trusted field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetUserID ¶
SetUserID sets the UserID field.
When the provided Repo type is nil, it will set nothing and immediately return.
func (*Repo) SetVisibility ¶
SetVisibility sets the Visibility field.
When the provided Repo type is nil, it will set nothing and immediately return.
type Secret ¶
type Secret struct {
ID *int64 `json:"id,omitempty"`
Org *string `json:"org,omitempty"`
Repo *string `json:"repo,omitempty"`
Team *string `json:"team,omitempty"`
Name *string `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
Type *string `json:"type,omitempty"`
Images *[]string `json:"images,omitempty"`
Events *[]string `json:"events,omitempty"`
}
Secret is the library representation of a secret.
func SecretFromContext ¶
SecretFromContext retrieves the Secret type from the context.
func (*Secret) GetEvents ¶
GetEvents returns the Events field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetID ¶
GetID returns the ID field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetImages ¶
GetImages returns the Images field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetName ¶
GetName returns the Name field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetOrg ¶
GetOrg returns the Org field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetRepo ¶
GetRepo returns the Repo field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetTeam ¶
GetTeam returns the Team field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetType ¶
GetType returns the Type field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) GetValue ¶
GetValue returns the Value field.
When the provided Secret type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Secret) Match ¶
Match returns true when the provided container matches the conditions to inject a secret into a pipeline container resource
func (*Secret) SetEvents ¶
SetEvents sets the Events field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetID ¶
SetID sets the ID field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetImages ¶
SetImages sets the Images field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetName ¶
SetName sets the Name field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetOrg ¶
SetOrg sets the Org field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetRepo ¶
SetRepo sets the Repo field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetTeam ¶
SetTeam sets the Team field.
When the provided Secret type is nil, it will set nothing and immediately return.
func (*Secret) SetType ¶
SetType sets the Type field.
When the provided Secret type is nil, it will set nothing and immediately return.
type Service ¶
type Service struct {
ID *int64 `json:"id,omitempty"`
BuildID *int64 `json:"build_id,omitempty"`
RepoID *int64 `json:"repo_id,omitempty"`
Number *int `json:"number,omitempty"`
Name *string `json:"name,omitempty"`
Status *string `json:"status,omitempty"`
Error *string `json:"error,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
Created *int64 `json:"created,omitempty"`
Started *int64 `json:"started,omitempty"`
Finished *int64 `json:"finished,omitempty"`
}
Service is the library representation of a service in a build.
func (*Service) GetBuildID ¶
GetBuildID returns the BuildID field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetCreated ¶
GetCreated returns the Created field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetError ¶
GetError returns the Error field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetExitCode ¶
GetExitCode returns the ExitCode field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetFinished ¶
GetFinished returns the Finished field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetID ¶
GetID returns the ID field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetName ¶
GetName returns the Name field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetNumber ¶
GetNumber returns the Number field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetRepoID ¶
GetRepoID returns the RepoID field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetStarted ¶
GetStarted returns the Started field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) GetStatus ¶
GetStatus returns the Status field.
When the provided Service type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Service) SetBuildID ¶
SetBuildID sets the BuildID field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetCreated ¶
SetCreated sets the Created field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetError ¶
SetError sets the Error field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetExitCode ¶
SetExitCode sets the ExitCode field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetFinished ¶
SetFinished sets the Finished field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetID ¶
SetID sets the ID field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetName ¶
SetName sets the Name field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetNumber ¶
SetNumber sets the Number field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetRepoID ¶
SetRepoID sets the RepoID field.
When the provided Service type is nil, it will set nothing and immediately return.
func (*Service) SetStarted ¶
SetStarted sets the Started field.
When the provided Service type is nil, it will set nothing and immediately return.
type Step ¶
type Step struct {
ID *int64 `json:"id,omitempty"`
BuildID *int64 `json:"build_id,omitempty"`
RepoID *int64 `json:"repo_id,omitempty"`
Number *int `json:"number,omitempty"`
Name *string `json:"name,omitempty"`
Stage *string `json:"stage,omitempty"`
Status *string `json:"status,omitempty"`
Error *string `json:"error,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
Created *int64 `json:"created,omitempty"`
Started *int64 `json:"started,omitempty"`
Finished *int64 `json:"finished,omitempty"`
Host *string `json:"host,omitempty"`
Runtime *string `json:"runtime,omitempty"`
Distribution *string `json:"distribution,omitempty"`
}
Step is the library representation of a step in a build.
func StepFromContext ¶
StepFromContext retrieves the Step type from the context.
func (*Step) GetBuildID ¶
GetBuildID returns the BuildID field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetCreated ¶
GetCreated returns the Created field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetDistribution ¶
GetDistribution returns the Runtime field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetError ¶
GetError returns the Error field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetExitCode ¶
GetExitCode returns the ExitCode field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetFinished ¶
GetFinished returns the Finished field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetHost ¶
GetHost returns the Host field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetID ¶
GetID returns the ID field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetName ¶
GetName returns the Name field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetNumber ¶
GetNumber returns the Number field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetRepoID ¶
GetRepoID returns the RepoID field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetRuntime ¶
GetRuntime returns the Runtime field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetStage ¶
GetStage returns the Stage field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetStarted ¶
GetStarted returns the Started field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) GetStatus ¶
GetStatus returns the Status field.
When the provided Step type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*Step) SetBuildID ¶
SetBuildID sets the BuildID field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetCreated ¶
SetCreated sets the Created field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetDistribution ¶
SetDistribution sets the Runtime field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetError ¶
SetError sets the Error field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetExitCode ¶
SetExitCode sets the ExitCode field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetFinished ¶
SetFinished sets the Finished field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetHost ¶
SetHost sets the Host field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetID ¶
SetID sets the ID field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetName ¶
SetName sets the Name field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetNumber ¶
SetNumber sets the Number field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetRepoID ¶
SetRepoID sets the RepoID field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetRuntime ¶
SetRuntime sets the Runtime field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetStage ¶
SetStage sets the Stage field.
When the provided Step type is nil, it will set nothing and immediately return.
func (*Step) SetStarted ¶
SetStarted sets the Started field.
When the provided Step type is nil, it will set nothing and immediately return.
type User ¶
type User struct {
ID *int64 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Token *string `json:"token,omitempty"`
Hash *string `json:"-"`
Active *bool `json:"active,omitempty"`
Admin *bool `json:"admin,omitempty"`
}
User is the library representation of a user.
func UserFromContext ¶
UserFromContext retrieves the User type from the context.
func (*User) GetActive ¶
GetActive returns the Active field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) GetAdmin ¶
GetAdmin returns the Admin field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) GetHash ¶
GetHash returns the Hash field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) GetID ¶
GetID returns the ID field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) GetName ¶
GetName returns the Name field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) GetToken ¶
GetToken returns the Token field.
When the provided User type is nil, or the field within the type is nil, it returns the zero value for the field.
func (*User) SetActive ¶
SetActive sets the Active field.
When the provided User type is nil, it will set nothing and immediately return.
func (*User) SetAdmin ¶
SetAdmin sets the Admin field.
When the provided User type is nil, it will set nothing and immediately return.
func (*User) SetHash ¶
SetHash sets the Hash field.
When the provided User type is nil, it will set nothing and immediately return.
func (*User) SetID ¶
SetID sets the ID field.
When the provided User type is nil, it will set nothing and immediately return.
func (*User) SetName ¶
SetName sets the Name field.
When the provided User type is nil, it will set nothing and immediately return.