Documentation
¶
Index ¶
- type Args
- type Client
- func (h *Client) CheckIfProjectExists(ctx context.Context, projectName string) (bool, error)
- func (h *Client) CheckIfUserAccountExists(ctx context.Context, userId int64) (bool, error)
- func (h *Client) CreateProject(ctx context.Context, name string) (*Project, error)
- func (h *Client) CreateUserAccount(ctx context.Context, projectName, userName string, permissions []Permission) (*User, error)
- func (h *Client) CreateWebhook(ctx context.Context, projectName string, webhookIn WebhookIn) (*Webhook, error)
- func (h *Client) DeleteProject(ctx context.Context, name string) error
- func (h *Client) DeleteUserAccount(ctx context.Context, userId int64) error
- func (h *Client) DeleteWebhook(ctx context.Context, projectName string, webhookId int64) error
- func (h *Client) FindUserAccountByName(ctx context.Context, projectName string, username string) (*User, error)
- func (h *Client) FindWebhookByName(ctx context.Context, projectName, hookName string) (webhook *Webhook, err error)
- func (h *Client) GetProject(ctx context.Context, name string) (*Project, error)
- func (h *Client) GetWebhook(ctx context.Context, projectName string, webhookId int64) (*Webhook, error)
- func (h *Client) NewAuthzRequest(ctx context.Context, method, urlPath string, body io.Reader) (*http.Request, error)
- func (h *Client) SetProjectQuota(ctx context.Context, name string, storageSize int) error
- func (h *Client) UpdateUserAccount(ctx context.Context, robotId int64, enabled bool) error
- type Config
- type Event
- type Permission
- type Project
- type User
- type Webhook
- type WebhookBody
- type WebhookIn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CheckIfProjectExists ¶
func (*Client) CheckIfUserAccountExists ¶
func (*Client) CreateProject ¶
func (*Client) CreateUserAccount ¶
func (*Client) CreateWebhook ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteUserAccount ¶
func (*Client) DeleteWebhook ¶
func (*Client) FindUserAccountByName ¶
func (*Client) FindWebhookByName ¶
func (*Client) GetProject ¶
func (*Client) GetWebhook ¶
func (*Client) NewAuthzRequest ¶
func (*Client) SetProjectQuota ¶
type Event ¶
type Event string
const ( DeleteArtifact Event = "DELETE_ARTIFACT" PullArtifact Event = "PULL_ARTIFACT" PushArtifact Event = "PUSH_ARTIFACT" DeleteChart Event = "DELETE_CHART" DownloadChart Event = "DOWNLOAD_CHART" UploadChart Event = "UPLOAD_CHART" QuotaExceed Event = "QUOTA_EXCEED" QuotaWarning Event = "QUOTA_WARNING" Replication Event = "REPLICATION" ScanningFailed Event = "SCANNING_FAILED" ScanningCompleted Event = "SCANNING_COMPLETED" ScanningStopped Event = "SCANNING_STOPPED" TagRetention Event = "TAG_RETENTION" )
type Permission ¶
type Permission string
+kubebuilder:validation:Enum=push-repository;pull-repository
const ( PushRepository Permission = "push-repository" PullRepository Permission = "pull-repository" )
type WebhookBody ¶
type WebhookBody struct { Type string `json:"type"` OccurAt int `json:"occur_at"` Operator string `json:"operator"` EventData struct { Resources []struct { Digest string `json:"digest"` Tag string `json:"tag"` ResourceUrl string `json:"resource_url"` } `json:"resources"` Repository struct { DateCreated int `json:"date_created"` Name string `json:"name"` Namespace string `json:"namespace"` RepoFullName string `json:"repo_full_name"` RepoType string `json:"repo_type"` } `json:"repository"` } `json:"event_data"` }
WebhookBody : Generated by pasting webhook body, json: DO NOT EDIT by hand
Click to show internal directories.
Click to hide internal directories.