Documentation
¶
Index ¶
- Variables
- type Build
- type BuildParams
- type BuildTag
- type BuildTrigger
- type Client
- func (c *Client) Delete(url string) (*http.Response, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(url, accept string) (*http.Response, error)
- func (c *Client) Patch(url, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) Post(url, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) String() string
- type Cron
- type CronParams
- type Driver
- type Duration
- type Error
- type Image
- type ImageDownload
- type ImageParams
- type Invite
- type Key
- type KeyParams
- type Logger
- type Manifest
- type ManifestJob
- type ManifestPassthrough
- type ManifestSource
- type Namespace
- func (n *Namespace) CreateWebhook(cli *Client, p WebhookParams) (*Webhook, error)
- func (n *Namespace) Delete(cli *Client) error
- func (n *Namespace) DeleteCollaborator(cli *Client, username string) error
- func (n *Namespace) Get(cli *Client) error
- func (n *Namespace) Invite(cli *Client, handle string) (*Invite, error)
- func (n *Namespace) Update(cli *Client, p NamespaceParams) error
- type NamespaceParams
- type NullInt64
- type NullString
- type NullTime
- type Object
- type ObjectParams
- type Schedule
- type Status
- type Time
- type URL
- type User
- type Variable
- type VariableParams
- type Visibility
- type Webhook
- type WebhookParams
- type WebhookResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var WebhookEvents = []string{
"build.submitted",
"build.tagged",
"invite.sent",
"invite.accepted",
"invite.rejected",
"namespaces",
"cron",
"images",
"objects",
"variables",
"ssh_keys",
}
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` Number int64 `json:"number"` Manifest string `json:"manifest"` Status Status `json:"status"` Output NullString `json:"output"` Tags []string `json:"tags"` CreatedAt Time `json:"created_at"` StartedAt NullTime `json:"started_at"` FinishedAt NullTime `json:"finished_at"` URL URL `json:"url"` ObjectsURL URL `json:"objects_url"` VariablesURL URL `json:"variables_url"` JobsURL URL `json:"jobs_url"` ArtifactsURL URL `json:"artifacts_url"` TagsURL URL `json:"tags_url"` User *User `json:"user"` Trigger *BuildTrigger `json:"trigger"` Namespace *Namespace `json:"namespace"` }
func SubmitBuild ¶
func SubmitBuild(cli *Client, p BuildParams) (*Build, error)
type BuildParams ¶
type BuildTag ¶
type BuildTrigger ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithLogger ¶
type Cron ¶
type Cron struct { ID int64 `json:"id"` AuthorID int64 `json:"author_id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` Name string `json:"name"` Schedule Schedule `json:"schedule"` Manifest Manifest `json:"manifest"` NextRun Time `json:"next_run"` CreatedAt Time `json:"created_at"` URL URL `json:"url"` }
func CreateCron ¶
func CreateCron(cli *Client, p CronParams) (*Cron, error)
type CronParams ¶
type Image ¶
type Image struct { ID int64 `json:"id"` AuthorID int64 `json:"author_id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` Driver Driver `json:"driver"` Name string `json:"name"` CreatedAt Time `json:"created_at"` URL URL `json:"url"` Download *ImageDownload `json:"download"` }
func CreateImage ¶
func CreateImage(cli *Client, p ImageParams) (*Image, error)
type ImageDownload ¶
type ImageDownload struct { Source URL `json:"source"` Error NullString `json:"error"` CreatedAt Time `json:"created_at"` StartedAt NullTime `json:"started_at"` FinishedAt NullTime `json:"finished_at"` }
type ImageParams ¶
type Invite ¶
type Key ¶
type Manifest ¶
type Manifest struct { Namespace string Driver map[string]string Env []string Objects ManifestPassthrough Sources []ManifestSource Stages []string AllowFailures []string `yaml:"allow_failures"` Jobs []ManifestJob }
func (Manifest) MarshalJSON ¶
func (*Manifest) UnmarshalJSON ¶
type ManifestJob ¶
type ManifestJob struct { Stage string Name string Commands []string Artifacts ManifestPassthrough }
type ManifestPassthrough ¶
func (ManifestPassthrough) MarshalYAML ¶
func (m ManifestPassthrough) MarshalYAML() (interface{}, error)
func (*ManifestPassthrough) UnmarshalYAML ¶
func (m *ManifestPassthrough) UnmarshalYAML(unmarshal func(interface{}) error) error
type ManifestSource ¶
func (ManifestSource) MarshalYAML ¶
func (s ManifestSource) MarshalYAML() (interface{}, error)
func (*ManifestSource) UnmarshalYAML ¶
func (s *ManifestSource) UnmarshalYAML(unmarshal func(interface{}) error) error
type Namespace ¶
type Namespace struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` RootID int64 `json:"root_id"` ParentID NullInt64 `json:"parent_id"` Name string `json:"name"` Path string `json:"path"` Description string `json:"description"` Visibility Visibility `json:"visibility"` CreatedAt Time `json:"created_at"` URL URL `json:"url"` BuildsURL URL `json:"builds_url"` NamespacesURL URL `json:"namespaces_url"` ImagesURL URL `json:"images_url"` ObjectsURL URL `json:"objects_url"` VariablesURL URL `json:"variables_url"` KeysURL URL `json:"keys_url"` InvitesURL URL `json:"invites_url"` CollaboratorsURL URL `json:"collaborators_url"` WebhooksURL URL `json:"webhooks_url"` User *User `json:"user"` Parent *Namespace `json:"parent"` Build *Build `json:"build"` }
func CreateNamespace ¶
func CreateNamespace(cli *Client, p NamespaceParams) (*Namespace, error)
func (*Namespace) CreateWebhook ¶
func (n *Namespace) CreateWebhook(cli *Client, p WebhookParams) (*Webhook, error)
func (*Namespace) DeleteCollaborator ¶
type NamespaceParams ¶
type NamespaceParams struct { Parent string `json:"parent"` Name string `json:"name"` Description string `json:"description"` Visibility Visibility `json:"visibility"` }
type NullString ¶
func (*NullString) MarshalJSON ¶
func (n *NullString) MarshalJSON() ([]byte, error)
func (*NullString) UnmarshalJSON ¶
func (n *NullString) UnmarshalJSON(p []byte) error
type Object ¶
type Object struct { ID int64 `json:"id"` AuthorID int64 `json:"author_id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` Name string `json:"name"` Type string `json:"type"` Size int64 `json:"size"` MD5 string `json:"md5"` SHA256 string `json:"sha256"` CreatedAt Time `json:"created_at"` URL URL `json:"url"` }
func CreateObject ¶
func CreateObject(cli *Client, p ObjectParams) (*Object, error)
type ObjectParams ¶
type Variable ¶
type Variable struct { ID int64 `json:"id"` AuthorID int64 `json:"author_id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` Key string `json:"key"` Value string `json:"value"` CreatedAt Time `json:"created_at"` URL URL `json:"url"` Namespace *Namespace `json:"namespace"` }
func CreateVariable ¶
func CreateVariable(cli *Client, p VariableParams) (*Variable, error)
type VariableParams ¶
type Visibility ¶
type Visibility uint8
const ( Private Visibility = iota // private Internal // internal Public // public )
func (Visibility) MarshalJSON ¶
func (v Visibility) MarshalJSON() ([]byte, error)
func (Visibility) String ¶
func (i Visibility) String() string
func (*Visibility) UnmarshalJSON ¶
func (v *Visibility) UnmarshalJSON(p []byte) error
type Webhook ¶
type Webhook struct { ID int64 `json:"id"` AuthorID int64 `json:"author_id"` UserID int64 `json:"user_id"` NamespaceID NullInt64 `json:"namespace_id"` PayloadURL URL `json:"payload_url"` SSL bool `json:"ssl"` Active bool `json:"active"` URL URL `json:"url"` Events []string `json:"events"` LastResponse *WebhookResponse `json:"last_response"` }
type WebhookParams ¶
type WebhookResponse ¶
type WebhookResponse struct { Error NullString `json:"error"` Code int `json:"code"` Duration Duration `json:"duration"` CreatedAt Time `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.