swagger

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 21 Imported by: 3

README

go-harbor

A Harbor V2 API client enabling Go programs to interact with Harbor in a simple and uniform way

NOTE

Generated by Harbor V2 swagger

Usage

import (
    "context"
    "fmt"
    harbor2 "github.com/hchenc/go-harbor"
)
ctx := context.WithValue(context.Background(), ContextBasicAuth, BasicAuth{
    UserName: "your username",
    Password: "your password",
})
config := NewConfigurationWithContext("your harbor basePath", ctx)

client := NewAPIClient(config)

projects, resp, err := client.ProjectApi.ListProjects(ctx, &ProjectApiListProjectsOpts{})
defer resp.Body.Close()
fmt.Println(projects, resp, err)

ToDo

  • The biggest thing this package still needs is tests 😞

Issues

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	ArtifactApi *ArtifactApiService

	AuditlogApi *AuditlogApiService

	ConfigureApi *ConfigureApiService

	GcApi *GcApiService

	HealthApi *HealthApiService

	IconApi *IconApiService

	ImmutableApi *ImmutableApiService

	LabelApi *LabelApiService

	LdapApi *LdapApiService

	MemberApi *MemberApiService

	PingApi *PingApiService

	PreheatApi *PreheatApiService

	ProjectApi *ProjectApiService

	ProjectMetadataApi *ProjectMetadataApiService

	QuotaApi *QuotaApiService

	RegistryApi *RegistryApiService

	ReplicationApi *ReplicationApiService

	RepositoryApi *RepositoryApiService

	RobotApi *RobotApiService

	Robotv1Api *Robotv1ApiService

	ScanApi *ScanApiService

	ScanAllApi *ScanAllApiService

	ScannerApi *ScannerApiService

	SearchApi *SearchApiService

	StatisticApi *StatisticApiService

	SystemCVEAllowlistApi *SystemCVEAllowlistApiService

	SysteminfoApi *SysteminfoApiService

	UserApi *UserApiService

	UsergroupApi *UsergroupApiService

	WebhookApi *WebhookApiService

	WebhookjobApi *WebhookjobApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Harbor API API v2.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Access

type Access struct {
	// The resource of the access
	Resource string `json:"resource,omitempty"`
	// The action of the access
	Action string `json:"action,omitempty"`
	// The effect of the access
	Effect string `json:"effect,omitempty"`
}
type AdditionLink struct {
	// The link of the addition
	Href string `json:"href,omitempty"`
	// Determine whether the link is an absolute URL or not
	Absolute bool `json:"absolute,omitempty"`
}
type AdditionLinks struct {
}

type Annotations

type Annotations struct {
}

type Artifact

type Artifact struct {
	// The ID of the artifact
	Id int64 `json:"id,omitempty"`
	// The type of the artifact, e.g. image, chart, etc
	Type_ string `json:"type,omitempty"`
	// The media type of the artifact
	MediaType string `json:"media_type,omitempty"`
	// The manifest media type of the artifact
	ManifestMediaType string `json:"manifest_media_type,omitempty"`
	// The ID of the project that the artifact belongs to
	ProjectId int64 `json:"project_id,omitempty"`
	// The ID of the repository that the artifact belongs to
	RepositoryId int64 `json:"repository_id,omitempty"`
	// The digest of the artifact
	Digest string `json:"digest,omitempty"`
	// The size of the artifact
	Size int64 `json:"size,omitempty"`
	// The digest of the icon
	Icon string `json:"icon,omitempty"`
	// The push time of the artifact
	PushTime time.Time `json:"push_time,omitempty"`
	// The latest pull time of the artifact
	PullTime      time.Time      `json:"pull_time,omitempty"`
	ExtraAttrs    *ExtraAttrs    `json:"extra_attrs,omitempty"`
	Annotations   *Annotations   `json:"annotations,omitempty"`
	References    []Reference    `json:"references,omitempty"`
	Tags          []Tag          `json:"tags,omitempty"`
	AdditionLinks *AdditionLinks `json:"addition_links,omitempty"`
	Labels        []Label        `json:"labels,omitempty"`
	// The overview of the scan result.
	ScanOverview *ScanOverview `json:"scan_overview,omitempty"`
}

type ArtifactApiAddLabelOpts

type ArtifactApiAddLabelOpts struct {
	XRequestId optional.String
}

type ArtifactApiCopyArtifactOpts

type ArtifactApiCopyArtifactOpts struct {
	XRequestId optional.String
}

type ArtifactApiCreateTagOpts

type ArtifactApiCreateTagOpts struct {
	XRequestId optional.String
}

type ArtifactApiDeleteArtifactOpts

type ArtifactApiDeleteArtifactOpts struct {
	XRequestId optional.String
}

type ArtifactApiDeleteTagOpts

type ArtifactApiDeleteTagOpts struct {
	XRequestId optional.String
}

type ArtifactApiGetAdditionOpts

type ArtifactApiGetAdditionOpts struct {
	XRequestId optional.String
}

type ArtifactApiGetArtifactOpts

type ArtifactApiGetArtifactOpts struct {
	XRequestId             optional.String
	Page                   optional.Int64
	PageSize               optional.Int64
	XAcceptVulnerabilities optional.String
	WithTag                optional.Bool
	WithLabel              optional.Bool
	WithScanOverview       optional.Bool
	WithSignature          optional.Bool
	WithImmutableStatus    optional.Bool
}

type ArtifactApiGetVulnerabilitiesAdditionOpts

type ArtifactApiGetVulnerabilitiesAdditionOpts struct {
	XRequestId             optional.String
	XAcceptVulnerabilities optional.String
}

type ArtifactApiListArtifactsOpts

type ArtifactApiListArtifactsOpts struct {
	XRequestId             optional.String
	Q                      optional.String
	Sort                   optional.String
	Page                   optional.Int64
	PageSize               optional.Int64
	XAcceptVulnerabilities optional.String
	WithTag                optional.Bool
	WithLabel              optional.Bool
	WithScanOverview       optional.Bool
	WithSignature          optional.Bool
	WithImmutableStatus    optional.Bool
}

type ArtifactApiListTagsOpts

type ArtifactApiListTagsOpts struct {
	XRequestId          optional.String
	Q                   optional.String
	Sort                optional.String
	Page                optional.Int64
	PageSize            optional.Int64
	WithSignature       optional.Bool
	WithImmutableStatus optional.Bool
}

type ArtifactApiRemoveLabelOpts

type ArtifactApiRemoveLabelOpts struct {
	XRequestId optional.String
}

type ArtifactApiService

type ArtifactApiService service

func (*ArtifactApiService) AddLabel

func (a *ArtifactApiService) AddLabel(projectName string, repositoryName string, reference string, label Label, localVarOptionals *ArtifactApiAddLabelOpts) (*http.Response, error)

func (*ArtifactApiService) CopyArtifact

func (a *ArtifactApiService) CopyArtifact(projectName string, repositoryName string, from string, localVarOptionals *ArtifactApiCopyArtifactOpts) (*http.Response, error)

func (*ArtifactApiService) CreateTag

func (a *ArtifactApiService) CreateTag(projectName string, repositoryName string, reference string, tag Tag, localVarOptionals *ArtifactApiCreateTagOpts) (*http.Response, error)

func (*ArtifactApiService) DeleteArtifact

func (a *ArtifactApiService) DeleteArtifact(projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiDeleteArtifactOpts) (*http.Response, error)

func (*ArtifactApiService) DeleteTag

func (a *ArtifactApiService) DeleteTag(projectName string, repositoryName string, reference string, tagName string, localVarOptionals *ArtifactApiDeleteTagOpts) (*http.Response, error)

func (*ArtifactApiService) GetAddition

func (a *ArtifactApiService) GetAddition(projectName string, repositoryName string, reference string, addition string, localVarOptionals *ArtifactApiGetAdditionOpts) (string, *http.Response, error)

func (*ArtifactApiService) GetArtifact

func (a *ArtifactApiService) GetArtifact(projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiGetArtifactOpts) (Artifact, *http.Response, error)

func (*ArtifactApiService) GetVulnerabilitiesAddition

func (a *ArtifactApiService) GetVulnerabilitiesAddition(projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiGetVulnerabilitiesAdditionOpts) (string, *http.Response, error)

func (*ArtifactApiService) ListArtifacts

func (a *ArtifactApiService) ListArtifacts(projectName string, repositoryName string, localVarOptionals *ArtifactApiListArtifactsOpts) ([]Artifact, *http.Response, error)

func (*ArtifactApiService) ListTags

func (a *ArtifactApiService) ListTags(projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiListTagsOpts) ([]Tag, *http.Response, error)

func (*ArtifactApiService) RemoveLabel

func (a *ArtifactApiService) RemoveLabel(projectName string, repositoryName string, reference string, labelId int64, localVarOptionals *ArtifactApiRemoveLabelOpts) (*http.Response, error)

type AuditLog

type AuditLog struct {
	// The ID of the audit log entry.
	Id int32 `json:"id,omitempty"`
	// Username of the user in this log entry.
	Username string `json:"username,omitempty"`
	// Name of the repository in this log entry.
	Resource string `json:"resource,omitempty"`
	// Tag of the repository in this log entry.
	ResourceType string `json:"resource_type,omitempty"`
	// The operation against the repository in this log entry.
	Operation string `json:"operation,omitempty"`
	// The time when this operation is triggered.
	OpTime time.Time `json:"op_time,omitempty"`
}

type AuditlogApiListAuditLogsOpts

type AuditlogApiListAuditLogsOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type AuditlogApiService

type AuditlogApiService service

func (*AuditlogApiService) ListAuditLogs

func (a *AuditlogApiService) ListAuditLogs(localVarOptionals *AuditlogApiListAuditLogsOpts) ([]AuditLog, *http.Response, error)

type AuthproxySetting

type AuthproxySetting struct {
	// The fully qualified URI of login endpoint of authproxy, such as 'https://192.168.1.2:8443/login'
	Endpoint string `json:"endpoint,omitempty"`
	// The fully qualified URI of token review endpoint of authproxy, such as 'https://192.168.1.2:8443/tokenreview'
	TokenreivewEndpoint string `json:"tokenreivew_endpoint,omitempty"`
	// The flag to determine whether Harbor can skip search the user/group when adding him as a member.
	SkipSearch bool `json:"skip_search,omitempty"`
	// The flag to determine whether Harbor should verify the certificate when connecting to the auth proxy.
	VerifyCert bool `json:"verify_cert,omitempty"`
	// The certificate to be pinned when connecting auth proxy.
	ServerCertificate string `json:"server_certificate,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BoolConfigItem

type BoolConfigItem struct {
	// The boolean value of current config item
	Value bool `json:"value,omitempty"`
	// The configure item can be updated or not
	Editable bool `json:"editable,omitempty"`
}

type ChartMetadata

type ChartMetadata struct {
	// The name of the chart
	Name string `json:"name"`
	// The URL to the relevant project page
	Home string `json:"home,omitempty"`
	// The URL to the source code of chart
	Sources []string `json:"sources,omitempty"`
	// A SemVer 2 version of chart
	Version string `json:"version"`
	// A one-sentence description of chart
	Description string `json:"description,omitempty"`
	// A list of string keywords
	Keywords []string `json:"keywords,omitempty"`
	// The name of template engine
	Engine string `json:"engine"`
	// The URL to an icon file
	Icon string `json:"icon"`
	// The API version of this chart
	ApiVersion string `json:"apiVersion"`
	// The version of the application enclosed in the chart
	AppVersion string `json:"appVersion"`
	// Whether or not this chart is deprecated
	Deprecated bool `json:"deprecated,omitempty"`
}

The metadata of chart version

type ChartVersion

type ChartVersion struct {
	// The name of the chart
	Name string `json:"name"`
	// The URL to the relevant project page
	Home string `json:"home,omitempty"`
	// The URL to the source code of chart
	Sources []string `json:"sources,omitempty"`
	// A SemVer 2 version of chart
	Version string `json:"version"`
	// A one-sentence description of chart
	Description string `json:"description,omitempty"`
	// A list of string keywords
	Keywords []string `json:"keywords,omitempty"`
	// The name of template engine
	Engine string `json:"engine"`
	// The URL to an icon file
	Icon string `json:"icon"`
	// The API version of this chart
	ApiVersion string `json:"apiVersion"`
	// The version of the application enclosed in the chart
	AppVersion string `json:"appVersion"`
	// Whether or not this chart is deprecated
	Deprecated bool `json:"deprecated,omitempty"`
	// A list of label
	Labels []Label `json:"labels,omitempty"`
	// The created time of the chart entry
	Created string `json:"created,omitempty"`
	// A flag to indicate if the chart entry is removed
	Removed bool `json:"removed,omitempty"`
	// The digest value of the chart entry
	Digest string `json:"digest,omitempty"`
	// The urls of the chart entry
	Urls []string `json:"urls,omitempty"`
}

A specified chart entry

type ComponentHealthStatus

type ComponentHealthStatus struct {
	// The component name
	Name string `json:"name,omitempty"`
	// The health status of component
	Status string `json:"status,omitempty"`
	// (optional) The error message when the status is \"unhealthy\"
	Error_ string `json:"error,omitempty"`
}

The health status of component

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
	Ctx           context.Context
}

func NewConfiguration

func NewConfiguration(basePath string) *Configuration

deprecated: Use NewConfigurationWithContext instead

func NewConfigurationWithContext added in v0.0.2

func NewConfigurationWithContext(basePath string, ctx context.Context) *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type Configurations

type Configurations struct {
	// The auth mode of current system, such as \"db_auth\", \"ldap_auth\", \"oidc_auth\"
	AuthMode string `json:"auth_mode,omitempty"`
	// The sender name for Email notification.
	EmailFrom string `json:"email_from,omitempty"`
	// The hostname of SMTP server that sends Email notification.
	EmailHost string `json:"email_host,omitempty"`
	// By default it's empty so the email_username is picked
	EmailIdentity string `json:"email_identity,omitempty"`
	// Whether or not the certificate will be verified when Harbor tries to access the email server.
	EmailInsecure bool `json:"email_insecure,omitempty"`
	// Email password
	EmailPassword string `json:"email_password,omitempty"`
	// The port of SMTP server
	EmailPort int32 `json:"email_port,omitempty"`
	// When it”s set to true the system will access Email server via TLS by default.  If it”s set to false, it still will handle \"STARTTLS\" from server side.
	EmailSsl bool `json:"email_ssl,omitempty"`
	// The username for authenticate against SMTP server
	EmailUsername string `json:"email_username,omitempty"`
	// The Base DN for LDAP binding.
	LdapBaseDn string `json:"ldap_base_dn,omitempty"`
	// The filter for LDAP search
	LdapFilter string `json:"ldap_filter,omitempty"`
	// The base DN to search LDAP group.
	LdapGroupBaseDn string `json:"ldap_group_base_dn,omitempty"`
	// Specify the ldap group which have the same privilege with Harbor admin
	LdapGroupAdminDn string `json:"ldap_group_admin_dn,omitempty"`
	// The attribute which is used as identity of the LDAP group, default is cn.'
	LdapGroupAttributeName string `json:"ldap_group_attribute_name,omitempty"`
	// The filter to search the ldap group
	LdapGroupSearchFilter string `json:"ldap_group_search_filter,omitempty"`
	// The scope to search ldap group. ”0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE”
	LdapGroupSearchScope int32 `json:"ldap_group_search_scope,omitempty"`
	// The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
	LdapScope int32 `json:"ldap_scope,omitempty"`
	// The DN of the user to do the search.
	LdapSearchDn string `json:"ldap_search_dn,omitempty"`
	// The password of the ldap search dn
	LdapSearchPassword string `json:"ldap_search_password,omitempty"`
	// Timeout in seconds for connection to LDAP server
	LdapTimeout int32 `json:"ldap_timeout,omitempty"`
	// The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\"
	LdapUid string `json:"ldap_uid,omitempty"`
	// The URL of LDAP server
	LdapUrl string `json:"ldap_url,omitempty"`
	// Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
	LdapVerifyCert bool `json:"ldap_verify_cert,omitempty"`
	// The user attribute to identify the group membership
	LdapGroupMembershipAttribute string `json:"ldap_group_membership_attribute,omitempty"`
	// Indicate who can create projects, it could be ”adminonly” or ”everyone”.
	ProjectCreationRestriction string `json:"project_creation_restriction,omitempty"`
	// The flag to indicate whether Harbor is in readonly mode.
	ReadOnly bool `json:"read_only,omitempty"`
	// Whether the Harbor instance supports self-registration.  If it”s set to false, admin need to add user to the instance.
	SelfRegistration bool `json:"self_registration,omitempty"`
	// The expiration time of the token for internal Registry, in minutes.
	TokenExpiration int32 `json:"token_expiration,omitempty"`
	// The client id of UAA
	UaaClientId string `json:"uaa_client_id,omitempty"`
	// The client secret of the UAA
	UaaClientSecret string `json:"uaa_client_secret,omitempty"`
	// The endpoint of the UAA
	UaaEndpoint string `json:"uaa_endpoint,omitempty"`
	// Verify the certificate in UAA server
	UaaVerifyCert bool `json:"uaa_verify_cert,omitempty"`
	// The endpoint of the HTTP auth
	HttpAuthproxyEndpoint string `json:"http_authproxy_endpoint,omitempty"`
	// The token review endpoint
	HttpAuthproxyTokenreviewEndpoint string `json:"http_authproxy_tokenreview_endpoint,omitempty"`
	// The group which has the harbor admin privileges
	HttpAuthproxyAdminGroups string `json:"http_authproxy_admin_groups,omitempty"`
	// The username which has the harbor admin privileges
	HttpAuthproxyAdminUsernames string `json:"http_authproxy_admin_usernames,omitempty"`
	// Verify the HTTP auth provider's certificate
	HttpAuthproxyVerifyCert bool `json:"http_authproxy_verify_cert,omitempty"`
	// Search user before onboard
	HttpAuthproxySkipSearch bool `json:"http_authproxy_skip_search,omitempty"`
	// The certificate of the HTTP auth provider
	HttpAuthproxyServerCertificate string `json:"http_authproxy_server_certificate,omitempty"`
	// The OIDC provider name
	OidcName string `json:"oidc_name,omitempty"`
	// The endpoint of the OIDC provider
	OidcEndpoint string `json:"oidc_endpoint,omitempty"`
	// The client ID of the OIDC provider
	OidcClientId string `json:"oidc_client_id,omitempty"`
	// The OIDC provider secret
	OidcClientSecret string `json:"oidc_client_secret,omitempty"`
	// The attribute claims the group name
	OidcGroupsClaim string `json:"oidc_groups_claim,omitempty"`
	// The OIDC group which has the harbor admin privileges
	OidcAdminGroup string `json:"oidc_admin_group,omitempty"`
	// The scope of the OIDC provider
	OidcScope string `json:"oidc_scope,omitempty"`
	// The attribute claims the username
	OidcUserClaim string `json:"oidc_user_claim,omitempty"`
	// Verify the OIDC provider's certificate'
	OidcVerifyCert bool `json:"oidc_verify_cert,omitempty"`
	// Auto onboard the OIDC user
	OidcAutoOnboard bool `json:"oidc_auto_onboard,omitempty"`
	// Extra parameters to add when redirect request to OIDC provider
	OidcExtraRedirectParms string `json:"oidc_extra_redirect_parms,omitempty"`
	// The robot account token duration in days
	RobotTokenDuration int32 `json:"robot_token_duration,omitempty"`
	// The rebot account name prefix
	RobotNamePrefix string `json:"robot_name_prefix,omitempty"`
	// Enable notification
	NotificationEnable bool `json:"notification_enable,omitempty"`
	// Enable quota per project
	QuotaPerProjectEnable bool `json:"quota_per_project_enable,omitempty"`
	// The storage quota per project
	StoragePerProject int32 `json:"storage_per_project,omitempty"`
}

type ConfigurationsResponse

type ConfigurationsResponse struct {
	// The auth mode of current system, such as \"db_auth\", \"ldap_auth\", \"oidc_auth\"
	AuthMode *StringConfigItem `json:"auth_mode,omitempty"`
	// The sender name for Email notification.
	EmailFrom *StringConfigItem `json:"email_from,omitempty"`
	// The hostname of SMTP server that sends Email notification.
	EmailHost *StringConfigItem `json:"email_host,omitempty"`
	// By default it's empty so the email_username is picked
	EmailIdentity *StringConfigItem `json:"email_identity,omitempty"`
	// Whether or not the certificate will be verified when Harbor tries to access the email server.
	EmailInsecure *BoolConfigItem `json:"email_insecure,omitempty"`
	// The port of SMTP server
	EmailPort *IntegerConfigItem `json:"email_port,omitempty"`
	// When it”s set to true the system will access Email server via TLS by default.  If it”s set to false, it still will handle \"STARTTLS\" from server side.
	EmailSsl *BoolConfigItem `json:"email_ssl,omitempty"`
	// The username for authenticate against SMTP server
	EmailUsername *StringConfigItem `json:"email_username,omitempty"`
	// The Base DN for LDAP binding.
	LdapBaseDn *StringConfigItem `json:"ldap_base_dn,omitempty"`
	// The filter for LDAP search
	LdapFilter *StringConfigItem `json:"ldap_filter,omitempty"`
	// The base DN to search LDAP group.
	LdapGroupBaseDn *StringConfigItem `json:"ldap_group_base_dn,omitempty"`
	// Specify the ldap group which have the same privilege with Harbor admin
	LdapGroupAdminDn *StringConfigItem `json:"ldap_group_admin_dn,omitempty"`
	// The attribute which is used as identity of the LDAP group, default is cn.'
	LdapGroupAttributeName *StringConfigItem `json:"ldap_group_attribute_name,omitempty"`
	// The filter to search the ldap group
	LdapGroupSearchFilter *StringConfigItem `json:"ldap_group_search_filter,omitempty"`
	// The scope to search ldap group. ”0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE”
	LdapGroupSearchScope *IntegerConfigItem `json:"ldap_group_search_scope,omitempty"`
	// The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
	LdapScope *IntegerConfigItem `json:"ldap_scope,omitempty"`
	// The DN of the user to do the search.
	LdapSearchDn *StringConfigItem `json:"ldap_search_dn,omitempty"`
	// Timeout in seconds for connection to LDAP server
	LdapTimeout *IntegerConfigItem `json:"ldap_timeout,omitempty"`
	// The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\"
	LdapUid *StringConfigItem `json:"ldap_uid,omitempty"`
	// The URL of LDAP server
	LdapUrl *StringConfigItem `json:"ldap_url,omitempty"`
	// Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
	LdapVerifyCert *BoolConfigItem `json:"ldap_verify_cert,omitempty"`
	// The user attribute to identify the group membership
	LdapGroupMembershipAttribute *StringConfigItem `json:"ldap_group_membership_attribute,omitempty"`
	// Indicate who can create projects, it could be ”adminonly” or ”everyone”.
	ProjectCreationRestriction *StringConfigItem `json:"project_creation_restriction,omitempty"`
	// The flag to indicate whether Harbor is in readonly mode.
	ReadOnly *BoolConfigItem `json:"read_only,omitempty"`
	// Whether the Harbor instance supports self-registration.  If it”s set to false, admin need to add user to the instance.
	SelfRegistration *BoolConfigItem `json:"self_registration,omitempty"`
	// The expiration time of the token for internal Registry, in minutes.
	TokenExpiration *IntegerConfigItem `json:"token_expiration,omitempty"`
	// The client id of UAA
	UaaClientId *StringConfigItem `json:"uaa_client_id,omitempty"`
	// The client secret of the UAA
	UaaClientSecret *StringConfigItem `json:"uaa_client_secret,omitempty"`
	// The endpoint of the UAA
	UaaEndpoint *StringConfigItem `json:"uaa_endpoint,omitempty"`
	// Verify the certificate in UAA server
	UaaVerifyCert *BoolConfigItem `json:"uaa_verify_cert,omitempty"`
	// The endpoint of the HTTP auth
	HttpAuthproxyEndpoint *StringConfigItem `json:"http_authproxy_endpoint,omitempty"`
	// The token review endpoint
	HttpAuthproxyTokenreviewEndpoint *StringConfigItem `json:"http_authproxy_tokenreview_endpoint,omitempty"`
	// The group which has the harbor admin privileges
	HttpAuthproxyAdminGroups *StringConfigItem `json:"http_authproxy_admin_groups,omitempty"`
	// The usernames which has the harbor admin privileges
	HttpAuthproxyAdminUsernames *StringConfigItem `json:"http_authproxy_admin_usernames,omitempty"`
	// Verify the HTTP auth provider's certificate
	HttpAuthproxyVerifyCert *BoolConfigItem `json:"http_authproxy_verify_cert,omitempty"`
	// Search user before onboard
	HttpAuthproxySkipSearch *BoolConfigItem `json:"http_authproxy_skip_search,omitempty"`
	// The certificate of the HTTP auth provider
	HttpAuthproxyServerCertificate *StringConfigItem `json:"http_authproxy_server_certificate,omitempty"`
	// The OIDC provider name
	OidcName *StringConfigItem `json:"oidc_name,omitempty"`
	// The endpoint of the OIDC provider
	OidcEndpoint *StringConfigItem `json:"oidc_endpoint,omitempty"`
	// The client ID of the OIDC provider
	OidcClientId *StringConfigItem `json:"oidc_client_id,omitempty"`
	// The attribute claims the group name
	OidcGroupsClaim *StringConfigItem `json:"oidc_groups_claim,omitempty"`
	// The OIDC group which has the harbor admin privileges
	OidcAdminGroup *StringConfigItem `json:"oidc_admin_group,omitempty"`
	// The scope of the OIDC provider
	OidcScope *StringConfigItem `json:"oidc_scope,omitempty"`
	// The attribute claims the username
	OidcUserClaim *StringConfigItem `json:"oidc_user_claim,omitempty"`
	// Verify the OIDC provider's certificate'
	OidcVerifyCert *BoolConfigItem `json:"oidc_verify_cert,omitempty"`
	// Auto onboard the OIDC user
	OidcAutoOnboard *BoolConfigItem `json:"oidc_auto_onboard,omitempty"`
	// Extra parameters to add when redirect request to OIDC provider
	OidcExtraRedirectParms *StringConfigItem `json:"oidc_extra_redirect_parms,omitempty"`
	// The robot account token duration in days
	RobotTokenDuration *IntegerConfigItem `json:"robot_token_duration,omitempty"`
	// The rebot account name prefix
	RobotNamePrefix *StringConfigItem `json:"robot_name_prefix,omitempty"`
	// Enable notification
	NotificationEnable *BoolConfigItem `json:"notification_enable,omitempty"`
	// Enable quota per project
	QuotaPerProjectEnable *BoolConfigItem `json:"quota_per_project_enable,omitempty"`
	// The storage quota per project
	StoragePerProject *IntegerConfigItem `json:"storage_per_project,omitempty"`
	ScanAllPolicy     interface{}        `json:"scan_all_policy,omitempty"`
}

type ConfigureApiGetConfigurationsOpts

type ConfigureApiGetConfigurationsOpts struct {
	XRequestId optional.String
}

type ConfigureApiGetInternalconfigOpts

type ConfigureApiGetInternalconfigOpts struct {
	XRequestId optional.String
}

type ConfigureApiService

type ConfigureApiService service

func (*ConfigureApiService) GetConfigurations

func (*ConfigureApiService) GetInternalconfig

func (*ConfigureApiService) UpdateConfigurations

func (a *ConfigureApiService) UpdateConfigurations(configurations Configurations, localVarOptionals *ConfigureApiUpdateConfigurationsOpts) (*http.Response, error)

type ConfigureApiUpdateConfigurationsOpts

type ConfigureApiUpdateConfigurationsOpts struct {
	XRequestId optional.String
}

type CveAllowlist

type CveAllowlist struct {
	// ID of the allowlist
	Id int32 `json:"id,omitempty"`
	// ID of the project which the allowlist belongs to.  For system level allowlist this attribute is zero.
	ProjectId int32 `json:"project_id,omitempty"`
	// the time for expiration of the allowlist, in the form of seconds since epoch.  This is an optional attribute, if it's not set the CVE allowlist does not expire.
	ExpiresAt int32              `json:"expires_at,omitempty"`
	Items     []CveAllowlistItem `json:"items,omitempty"`
	// The creation time of the allowlist.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the allowlist.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

The CVE Allowlist for system or project

type CveAllowlistItem

type CveAllowlistItem struct {
	// The ID of the CVE, such as \"CVE-2019-10164\"
	CveId string `json:"cve_id,omitempty"`
}

The item in CVE allowlist

type Errors

type Errors struct {
	Errors []ModelError `json:"errors,omitempty"`
}

The error array that describe the errors got during the handling of request

type EventType

type EventType struct {
}

Webhook supportted event type.

type Execution

type Execution struct {
	// The ID of execution
	Id int32 `json:"id,omitempty"`
	// The vendor type of execution
	VendorType string `json:"vendor_type,omitempty"`
	// The vendor id of execution
	VendorId int32 `json:"vendor_id,omitempty"`
	// The status of execution
	Status string `json:"status,omitempty"`
	// The status message of execution
	StatusMessage string   `json:"status_message,omitempty"`
	Metrics       *Metrics `json:"metrics,omitempty"`
	// The trigger of execution
	Trigger    string      `json:"trigger,omitempty"`
	ExtraAttrs *ExtraAttrs `json:"extra_attrs,omitempty"`
	// The start time of execution
	StartTime string `json:"start_time,omitempty"`
	// The end time of execution
	EndTime string `json:"end_time,omitempty"`
}

type ExtraAttrs

type ExtraAttrs struct {
}

type FilterStyle

type FilterStyle struct {
	// The filter type
	Type_ string `json:"type,omitempty"`
	// The filter style
	Style string `json:"style,omitempty"`
	// The filter values
	Values []string `json:"values,omitempty"`
}

The style of the resource filter

type GcApiCreateGCScheduleOpts

type GcApiCreateGCScheduleOpts struct {
	XRequestId optional.String
}

type GcApiGetGCHistoryOpts

type GcApiGetGCHistoryOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type GcApiGetGCLogOpts

type GcApiGetGCLogOpts struct {
	XRequestId optional.String
}

type GcApiGetGCOpts

type GcApiGetGCOpts struct {
	XRequestId optional.String
}

type GcApiGetGCScheduleOpts

type GcApiGetGCScheduleOpts struct {
	XRequestId optional.String
}

type GcApiService

type GcApiService service

func (*GcApiService) CreateGCSchedule

func (a *GcApiService) CreateGCSchedule(schedule Schedule, localVarOptionals *GcApiCreateGCScheduleOpts) (*http.Response, error)

func (*GcApiService) GetGC

func (a *GcApiService) GetGC(gcId int64, localVarOptionals *GcApiGetGCOpts) (GcHistory, *http.Response, error)

func (*GcApiService) GetGCHistory

func (a *GcApiService) GetGCHistory(localVarOptionals *GcApiGetGCHistoryOpts) ([]GcHistory, *http.Response, error)

func (*GcApiService) GetGCLog

func (a *GcApiService) GetGCLog(gcId int64, localVarOptionals *GcApiGetGCLogOpts) (string, *http.Response, error)

func (*GcApiService) GetGCSchedule

func (a *GcApiService) GetGCSchedule(localVarOptionals *GcApiGetGCScheduleOpts) (GcHistory, *http.Response, error)

func (*GcApiService) UpdateGCSchedule

func (a *GcApiService) UpdateGCSchedule(schedule Schedule, localVarOptionals *GcApiUpdateGCScheduleOpts) (*http.Response, error)

type GcApiUpdateGCScheduleOpts

type GcApiUpdateGCScheduleOpts struct {
	XRequestId optional.String
}

type GcHistory

type GcHistory struct {
	// the id of gc job.
	Id int32 `json:"id,omitempty"`
	// the job name of gc job.
	JobName string `json:"job_name,omitempty"`
	// the job kind of gc job.
	JobKind string `json:"job_kind,omitempty"`
	// the job parameters of gc job.
	JobParameters string       `json:"job_parameters,omitempty"`
	Schedule      *ScheduleObj `json:"schedule,omitempty"`
	// the status of gc job.
	JobStatus string `json:"job_status,omitempty"`
	// if gc job was deleted.
	Deleted bool `json:"deleted,omitempty"`
	// the creation time of gc job.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// the update time of gc job.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type GeneralInfo

type GeneralInfo struct {
	// If the Harbor instance is deployed with nested notary.
	WithNotary bool `json:"with_notary,omitempty"`
	// If the Harbor instance is deployed with nested chartmuseum.
	WithChartmuseum bool `json:"with_chartmuseum,omitempty"`
	// The url of registry against which the docker command should be issued.
	RegistryUrl string `json:"registry_url,omitempty"`
	// The external URL of Harbor, with protocol.
	ExternalUrl string `json:"external_url,omitempty"`
	// The auth mode of current Harbor instance.
	AuthMode string `json:"auth_mode,omitempty"`
	// Indicate who can create projects, it could be 'adminonly' or 'everyone'.
	ProjectCreationRestriction string `json:"project_creation_restriction,omitempty"`
	// Indicate whether the Harbor instance enable user to register himself.
	SelfRegistration bool `json:"self_registration,omitempty"`
	// Indicate whether there is a ca root cert file ready for download in the file system.
	HasCaRoot bool `json:"has_ca_root,omitempty"`
	// The build version of Harbor.
	HarborVersion string `json:"harbor_version,omitempty"`
	// The storage provider's name of Harbor registry
	RegistryStorageProviderName string `json:"registry_storage_provider_name,omitempty"`
	// The flag to indicate whether Harbor is in readonly mode.
	ReadOnly bool `json:"read_only,omitempty"`
	// The flag to indicate whether notification mechanism is enabled on Harbor instance.
	NotificationEnable bool `json:"notification_enable,omitempty"`
	// The setting of auth proxy this is only available when Harbor relies on authproxy for authentication.
	AuthproxySettings *AuthproxySetting `json:"authproxy_settings,omitempty"`
}

type GenericHarborError added in v0.0.3

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

GenericHarborError Provides access to the body, error and model on returned errors.

func (GenericHarborError) Body added in v0.0.3

func (e GenericHarborError) Body() []byte

Body returns the raw bytes of the response

func (GenericHarborError) Error added in v0.0.3

func (e GenericHarborError) Error() string

Error returns non-empty string if there was an error.

func (GenericHarborError) Model added in v0.0.3

func (e GenericHarborError) Model() interface{}

Model returns the unpacked model of the error

func (GenericHarborError) StatusCode added in v0.0.3

func (e GenericHarborError) StatusCode() int

type HealthApiGetHealthOpts

type HealthApiGetHealthOpts struct {
	XRequestId optional.String
}

type HealthApiService

type HealthApiService service

func (*HealthApiService) GetHealth

func (a *HealthApiService) GetHealth(localVarOptionals *HealthApiGetHealthOpts) (OverallHealthStatus, *http.Response, error)

type Icon

type Icon struct {
	// The content type of the icon
	ContentType string `json:"content-type,omitempty"`
	// The base64 encoded content of the icon
	Content string `json:"content,omitempty"`
}

type IconApiGetIconOpts

type IconApiGetIconOpts struct {
	XRequestId optional.String
}

type IconApiService

type IconApiService service

func (*IconApiService) GetIcon

func (a *IconApiService) GetIcon(digest string, localVarOptionals *IconApiGetIconOpts) (Icon, *http.Response, error)

type ImmutableApiCreateImmuRuleOpts

type ImmutableApiCreateImmuRuleOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ImmutableApiDeleteImmuRuleOpts

type ImmutableApiDeleteImmuRuleOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ImmutableApiListImmuRulesOpts

type ImmutableApiListImmuRulesOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Page            optional.Int64
	PageSize        optional.Int64
	Q               optional.String
	Sort            optional.String
}

type ImmutableApiService

type ImmutableApiService service

func (*ImmutableApiService) CreateImmuRule

func (a *ImmutableApiService) CreateImmuRule(projectNameOrId string, immutableRule ImmutableRule, localVarOptionals *ImmutableApiCreateImmuRuleOpts) (*http.Response, error)

func (*ImmutableApiService) DeleteImmuRule

func (a *ImmutableApiService) DeleteImmuRule(projectNameOrId string, immutableRuleId int64, localVarOptionals *ImmutableApiDeleteImmuRuleOpts) (*http.Response, error)

func (*ImmutableApiService) ListImmuRules

func (a *ImmutableApiService) ListImmuRules(projectNameOrId string, localVarOptionals *ImmutableApiListImmuRulesOpts) ([]ImmutableRule, *http.Response, error)

func (*ImmutableApiService) UpdateImmuRule

func (a *ImmutableApiService) UpdateImmuRule(projectNameOrId string, immutableRuleId int64, immutableRule ImmutableRule, localVarOptionals *ImmutableApiUpdateImmuRuleOpts) (*http.Response, error)

type ImmutableApiUpdateImmuRuleOpts

type ImmutableApiUpdateImmuRuleOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ImmutableRule

type ImmutableRule struct {
	Id             int32                          `json:"id,omitempty"`
	Priority       int32                          `json:"priority,omitempty"`
	Disabled       bool                           `json:"disabled,omitempty"`
	Action         string                         `json:"action,omitempty"`
	Template       string                         `json:"template,omitempty"`
	Params         map[string]interface{}         `json:"params,omitempty"`
	TagSelectors   []ImmutableSelector            `json:"tag_selectors,omitempty"`
	ScopeSelectors map[string][]ImmutableSelector `json:"scope_selectors,omitempty"`
}

type ImmutableSelector

type ImmutableSelector struct {
	Kind       string `json:"kind,omitempty"`
	Decoration string `json:"decoration,omitempty"`
	Pattern    string `json:"pattern,omitempty"`
	Extras     string `json:"extras,omitempty"`
}

type Instance

type Instance struct {
	// Unique ID
	Id int32 `json:"id,omitempty"`
	// Instance name
	Name string `json:"name,omitempty"`
	// Description of instance
	Description string `json:"description,omitempty"`
	// Based on which driver, identified by ID
	Vendor string `json:"vendor,omitempty"`
	// The service endpoint of this instance
	Endpoint string `json:"endpoint,omitempty"`
	// The authentication way supported
	AuthMode string `json:"auth_mode,omitempty"`
	// The auth credential data if exists
	AuthInfo map[string]string `json:"auth_info,omitempty"`
	// The health status
	Status string `json:"status,omitempty"`
	// Whether the instance is activated or not
	Enabled bool `json:"enabled,omitempty"`
	// Whether the instance is default or not
	Default_ bool `json:"default,omitempty"`
	// Whether the instance endpoint is insecure or not
	Insecure bool `json:"insecure,omitempty"`
	// The timestamp of instance setting up
	SetupTimestamp int64 `json:"setup_timestamp,omitempty"`
}

type IntegerConfigItem

type IntegerConfigItem struct {
	// The integer value of current config item
	Value int32 `json:"value,omitempty"`
	// The configure item can be updated or not
	Editable bool `json:"editable,omitempty"`
}

type InternalConfigurationsResponse

type InternalConfigurationsResponse struct {
}

type IsDefault

type IsDefault struct {
	// A flag indicating whether a scanner registration is default.
	IsDefault bool `json:"is_default,omitempty"`
}

type Label

type Label struct {
	// The ID of the label
	Id int64 `json:"id,omitempty"`
	// The name the label
	Name string `json:"name,omitempty"`
	// The description the label
	Description string `json:"description,omitempty"`
	// The color the label
	Color string `json:"color,omitempty"`
	// The scope the label
	Scope string `json:"scope,omitempty"`
	// The ID of project that the label belongs to
	ProjectId int64 `json:"project_id,omitempty"`
	// The creation time the label
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the label
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type LabelApiCreateLabelOpts

type LabelApiCreateLabelOpts struct {
	XRequestId optional.String
}

type LabelApiDeleteLabelOpts

type LabelApiDeleteLabelOpts struct {
	XRequestId optional.String
}

type LabelApiGetLabelByIDOpts

type LabelApiGetLabelByIDOpts struct {
	XRequestId optional.String
}

type LabelApiListLabelsOpts

type LabelApiListLabelsOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Name       optional.String
	Scope      optional.String
	ProjectId  optional.Int64
}

type LabelApiService

type LabelApiService service

func (*LabelApiService) CreateLabel

func (a *LabelApiService) CreateLabel(label Label, localVarOptionals *LabelApiCreateLabelOpts) (*http.Response, error)

func (*LabelApiService) DeleteLabel

func (a *LabelApiService) DeleteLabel(labelId int64, localVarOptionals *LabelApiDeleteLabelOpts) (*http.Response, error)

func (*LabelApiService) GetLabelByID

func (a *LabelApiService) GetLabelByID(labelId int64, localVarOptionals *LabelApiGetLabelByIDOpts) (Label, *http.Response, error)

func (*LabelApiService) ListLabels

func (a *LabelApiService) ListLabels(localVarOptionals *LabelApiListLabelsOpts) ([]Label, *http.Response, error)

func (*LabelApiService) UpdateLabel

func (a *LabelApiService) UpdateLabel(labelId int64, label Label, localVarOptionals *LabelApiUpdateLabelOpts) (*http.Response, error)

type LabelApiUpdateLabelOpts

type LabelApiUpdateLabelOpts struct {
	XRequestId optional.String
}

type LdapApiImportLdapUserOpts

type LdapApiImportLdapUserOpts struct {
	XRequestId optional.String
}

type LdapApiPingLdapOpts

type LdapApiPingLdapOpts struct {
	XRequestId optional.String
	Ldapconf   optional.Interface
}

type LdapApiSearchLdapGroupOpts

type LdapApiSearchLdapGroupOpts struct {
	XRequestId optional.String
	Groupname  optional.String
	Groupdn    optional.String
}

type LdapApiSearchLdapUserOpts

type LdapApiSearchLdapUserOpts struct {
	XRequestId optional.String
	Username   optional.String
}

type LdapApiService

type LdapApiService service

func (*LdapApiService) ImportLdapUser

func (a *LdapApiService) ImportLdapUser(uidList LdapImportUsers, localVarOptionals *LdapApiImportLdapUserOpts) (*http.Response, error)

func (*LdapApiService) PingLdap

func (a *LdapApiService) PingLdap(localVarOptionals *LdapApiPingLdapOpts) (LdapPingResult, *http.Response, error)

func (*LdapApiService) SearchLdapGroup

func (a *LdapApiService) SearchLdapGroup(localVarOptionals *LdapApiSearchLdapGroupOpts) ([]UserGroup, *http.Response, error)

func (*LdapApiService) SearchLdapUser

func (a *LdapApiService) SearchLdapUser(localVarOptionals *LdapApiSearchLdapUserOpts) ([]LdapUser, *http.Response, error)

type LdapConf

type LdapConf struct {
	// The url of ldap service.
	LdapUrl string `json:"ldap_url,omitempty"`
	// The search dn of ldap service.
	LdapSearchDn string `json:"ldap_search_dn,omitempty"`
	// The search password of ldap service.
	LdapSearchPassword string `json:"ldap_search_password,omitempty"`
	// The base dn of ldap service.
	LdapBaseDn string `json:"ldap_base_dn,omitempty"`
	// The serach filter of ldap service.
	LdapFilter string `json:"ldap_filter,omitempty"`
	// The serach uid from ldap service attributes.
	LdapUid string `json:"ldap_uid,omitempty"`
	// The serach scope of ldap service.
	LdapScope int64 `json:"ldap_scope,omitempty"`
	// The connect timeout of ldap service(second).
	LdapConnectionTimeout int64 `json:"ldap_connection_timeout,omitempty"`
	// Verify Ldap server certificate.
	LdapVerifyCert bool `json:"ldap_verify_cert,omitempty"`
}

The ldap configure properties

type LdapFailedImportUser

type LdapFailedImportUser struct {
	// the uid can't add to system.
	Uid string `json:"uid,omitempty"`
	// fail reason.
	Error_ string `json:"error,omitempty"`
}

type LdapImportUsers

type LdapImportUsers struct {
	// selected uid list
	LdapUidList []string `json:"ldap_uid_list,omitempty"`
}

type LdapPingResult

type LdapPingResult struct {
	// Test success
	Success bool `json:"success,omitempty"`
	// The ping operation output message.
	Message string `json:"message,omitempty"`
}

The ldap ping result

type LdapUser

type LdapUser struct {
	// ldap username.
	Username string `json:"username,omitempty"`
	// The user realname from \"uid\" or \"cn\" attribute.
	Realname string `json:"realname,omitempty"`
	// The user email address from \"mail\" or \"email\" attribute.
	Email string `json:"email,omitempty"`
}

type MemberApiCreateProjectMemberOpts

type MemberApiCreateProjectMemberOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	ProjectMember   optional.Interface
}

type MemberApiDeleteProjectMemberOpts

type MemberApiDeleteProjectMemberOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type MemberApiGetProjectMemberOpts

type MemberApiGetProjectMemberOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type MemberApiListProjectMembersOpts

type MemberApiListProjectMembersOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Page            optional.Int64
	PageSize        optional.Int64
	Entityname      optional.String
}

type MemberApiService

type MemberApiService service

func (*MemberApiService) CreateProjectMember

func (a *MemberApiService) CreateProjectMember(projectNameOrId string, localVarOptionals *MemberApiCreateProjectMemberOpts) (*http.Response, error)

func (*MemberApiService) DeleteProjectMember

func (a *MemberApiService) DeleteProjectMember(projectNameOrId string, mid int64, localVarOptionals *MemberApiDeleteProjectMemberOpts) (*http.Response, error)

func (*MemberApiService) GetProjectMember

func (a *MemberApiService) GetProjectMember(projectNameOrId string, mid int64, localVarOptionals *MemberApiGetProjectMemberOpts) (ProjectMemberEntity, *http.Response, error)

func (*MemberApiService) ListProjectMembers

func (a *MemberApiService) ListProjectMembers(projectNameOrId string, localVarOptionals *MemberApiListProjectMembersOpts) ([]ProjectMemberEntity, *http.Response, error)

func (*MemberApiService) UpdateProjectMember

func (a *MemberApiService) UpdateProjectMember(projectNameOrId string, mid int64, localVarOptionals *MemberApiUpdateProjectMemberOpts) (*http.Response, error)

type MemberApiUpdateProjectMemberOpts

type MemberApiUpdateProjectMemberOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Role            optional.Interface
}

type Metadata

type Metadata struct {
	// id
	Id string `json:"id,omitempty"`
	// name
	Name string `json:"name,omitempty"`
	// icon
	Icon string `json:"icon,omitempty"`
	// maintainers
	Maintainers []string `json:"maintainers,omitempty"`
	// version
	Version string `json:"version,omitempty"`
	// source
	Source string `json:"source,omitempty"`
}

type Metrics

type Metrics struct {
	// The count of task
	TaskCount int32 `json:"task_count,omitempty"`
	// The count of success task
	SuccessTaskCount int32 `json:"success_task_count,omitempty"`
	// The count of error task
	ErrorTaskCount int32 `json:"error_task_count,omitempty"`
	// The count of pending task
	PendingTaskCount int32 `json:"pending_task_count,omitempty"`
	// The count of running task
	RunningTaskCount int32 `json:"running_task_count,omitempty"`
	// The count of scheduled task
	ScheduledTaskCount int32 `json:"scheduled_task_count,omitempty"`
	// The count of stopped task
	StoppedTaskCount int32 `json:"stopped_task_count,omitempty"`
}

type ModelError

type ModelError struct {
	// The error code
	Code string `json:"code,omitempty"`
	// The error message
	Message string `json:"message,omitempty"`
}

a model for all the error response coming from harbor

type NativeReportSummary

type NativeReportSummary struct {
	// id of the native scan report
	ReportId string `json:"report_id,omitempty"`
	// The status of the report generating process
	ScanStatus string `json:"scan_status,omitempty"`
	// The overall severity
	Severity string `json:"severity,omitempty"`
	// The seconds spent for generating the report
	Duration int64                 `json:"duration,omitempty"`
	Summary  *VulnerabilitySummary `json:"summary,omitempty"`
	// The start time of the scan process that generating report
	StartTime time.Time `json:"start_time,omitempty"`
	// The end time of the scan process that generating report
	EndTime time.Time `json:"end_time,omitempty"`
	// The complete percent of the scanning which value is between 0 and 100
	CompletePercent int32    `json:"complete_percent,omitempty"`
	Scanner         *Scanner `json:"scanner,omitempty"`
}

The summary for the native report

type NotifyType

type NotifyType struct {
}

Webhook supportted notify type.

type OidcCliSecretReq

type OidcCliSecretReq struct {
	// The new secret
	Secret string `json:"secret,omitempty"`
}

type OidcUserInfo

type OidcUserInfo struct {
	// the ID of the OIDC info record
	Id int32 `json:"id,omitempty"`
	// the ID of the user
	UserId int32 `json:"user_id,omitempty"`
	// the concatenation of sub and issuer in the ID token
	Subiss string `json:"subiss,omitempty"`
	// the secret of the OIDC user that can be used for CLI to push/pull artifacts
	Secret string `json:"secret,omitempty"`
	// The creation time of the OIDC user info record.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the OIDC user info record.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type OverallHealthStatus

type OverallHealthStatus struct {
	// The overall health status. It is \"healthy\" only when all the components' status are \"healthy\"
	Status     string                  `json:"status,omitempty"`
	Components []ComponentHealthStatus `json:"components,omitempty"`
}

The system health status

type PasswordReq

type PasswordReq struct {
	// The user's existing password.
	OldPassword string `json:"old_password,omitempty"`
	// New password for marking as to be updated.
	NewPassword string `json:"new_password,omitempty"`
}

type Permission

type Permission struct {
	// The permission resoruce
	Resource string `json:"resource,omitempty"`
	// The permission action
	Action string `json:"action,omitempty"`
}

type PingApiGetPingOpts

type PingApiGetPingOpts struct {
	XRequestId optional.String
}

type PingApiService

type PingApiService service

func (*PingApiService) GetPing

func (a *PingApiService) GetPing(localVarOptionals *PingApiGetPingOpts) (string, *http.Response, error)

type Platform

type Platform struct {
	// The architecture that the artifact applys to
	Architecture string `json:"architecture,omitempty"`
	// The OS that the artifact applys to
	Os string `json:"os,omitempty"`
	// The version of the OS that the artifact applys to
	OsVersion string `json:"'os.version',omitempty"`
	// The features of the OS that the artifact applys to
	OsFeatures []string `json:"'os.features',omitempty"`
	// The variant of the CPU
	Variant string `json:"variant,omitempty"`
}

type PreheatApiCreateInstanceOpts

type PreheatApiCreateInstanceOpts struct {
	XRequestId optional.String
}

type PreheatApiCreatePolicyOpts

type PreheatApiCreatePolicyOpts struct {
	XRequestId optional.String
}

type PreheatApiDeleteInstanceOpts

type PreheatApiDeleteInstanceOpts struct {
	XRequestId optional.String
}

type PreheatApiDeletePolicyOpts

type PreheatApiDeletePolicyOpts struct {
	XRequestId optional.String
}

type PreheatApiGetExecutionOpts

type PreheatApiGetExecutionOpts struct {
	XRequestId optional.String
}

type PreheatApiGetInstanceOpts

type PreheatApiGetInstanceOpts struct {
	XRequestId optional.String
}

type PreheatApiGetPolicyOpts

type PreheatApiGetPolicyOpts struct {
	XRequestId optional.String
}

type PreheatApiGetPreheatLogOpts

type PreheatApiGetPreheatLogOpts struct {
	XRequestId optional.String
}

type PreheatApiListExecutionsOpts

type PreheatApiListExecutionsOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Q          optional.String
	Sort       optional.String
}

type PreheatApiListInstancesOpts

type PreheatApiListInstancesOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Q          optional.String
	Sort       optional.String
}

type PreheatApiListPoliciesOpts

type PreheatApiListPoliciesOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Q          optional.String
	Sort       optional.String
}

type PreheatApiListProvidersOpts

type PreheatApiListProvidersOpts struct {
	XRequestId optional.String
}

type PreheatApiListProvidersUnderProjectOpts

type PreheatApiListProvidersUnderProjectOpts struct {
	XRequestId optional.String
}

type PreheatApiListTasksOpts

type PreheatApiListTasksOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Q          optional.String
	Sort       optional.String
}

type PreheatApiManualPreheatOpts

type PreheatApiManualPreheatOpts struct {
	XRequestId optional.String
}

type PreheatApiPingInstancesOpts

type PreheatApiPingInstancesOpts struct {
	XRequestId optional.String
}

type PreheatApiService

type PreheatApiService service

func (*PreheatApiService) CreateInstance

func (a *PreheatApiService) CreateInstance(instance Instance, localVarOptionals *PreheatApiCreateInstanceOpts) (*http.Response, error)

func (*PreheatApiService) CreatePolicy

func (a *PreheatApiService) CreatePolicy(projectName string, policy PreheatPolicy, localVarOptionals *PreheatApiCreatePolicyOpts) (*http.Response, error)

func (*PreheatApiService) DeleteInstance

func (a *PreheatApiService) DeleteInstance(preheatInstanceName string, localVarOptionals *PreheatApiDeleteInstanceOpts) (*http.Response, error)

func (*PreheatApiService) DeletePolicy

func (a *PreheatApiService) DeletePolicy(projectName string, preheatPolicyName string, localVarOptionals *PreheatApiDeletePolicyOpts) (*http.Response, error)

func (*PreheatApiService) GetExecution

func (a *PreheatApiService) GetExecution(projectName string, preheatPolicyName string, executionId int32, localVarOptionals *PreheatApiGetExecutionOpts) (Execution, *http.Response, error)

func (*PreheatApiService) GetInstance

func (a *PreheatApiService) GetInstance(preheatInstanceName string, localVarOptionals *PreheatApiGetInstanceOpts) (Instance, *http.Response, error)

func (*PreheatApiService) GetPolicy

func (a *PreheatApiService) GetPolicy(projectName string, preheatPolicyName string, localVarOptionals *PreheatApiGetPolicyOpts) (PreheatPolicy, *http.Response, error)

func (*PreheatApiService) GetPreheatLog

func (a *PreheatApiService) GetPreheatLog(projectName string, preheatPolicyName string, executionId int32, taskId int32, localVarOptionals *PreheatApiGetPreheatLogOpts) (string, *http.Response, error)

func (*PreheatApiService) ListExecutions

func (a *PreheatApiService) ListExecutions(projectName string, preheatPolicyName string, localVarOptionals *PreheatApiListExecutionsOpts) ([]Execution, *http.Response, error)

func (*PreheatApiService) ListInstances

func (a *PreheatApiService) ListInstances(localVarOptionals *PreheatApiListInstancesOpts) ([]Instance, *http.Response, error)

func (*PreheatApiService) ListPolicies

func (a *PreheatApiService) ListPolicies(projectName string, localVarOptionals *PreheatApiListPoliciesOpts) ([]PreheatPolicy, *http.Response, error)

func (*PreheatApiService) ListProviders

func (a *PreheatApiService) ListProviders(localVarOptionals *PreheatApiListProvidersOpts) ([]Metadata, *http.Response, error)

func (*PreheatApiService) ListProvidersUnderProject

func (a *PreheatApiService) ListProvidersUnderProject(projectName string, localVarOptionals *PreheatApiListProvidersUnderProjectOpts) ([]ProviderUnderProject, *http.Response, error)

func (*PreheatApiService) ListTasks

func (a *PreheatApiService) ListTasks(projectName string, preheatPolicyName string, executionId int32, localVarOptionals *PreheatApiListTasksOpts) ([]Task, *http.Response, error)

func (*PreheatApiService) ManualPreheat

func (a *PreheatApiService) ManualPreheat(projectName string, preheatPolicyName string, policy PreheatPolicy, localVarOptionals *PreheatApiManualPreheatOpts) (*http.Response, error)

func (*PreheatApiService) PingInstances

func (a *PreheatApiService) PingInstances(instance Instance, localVarOptionals *PreheatApiPingInstancesOpts) (*http.Response, error)

func (*PreheatApiService) StopExecution

func (a *PreheatApiService) StopExecution(projectName string, preheatPolicyName string, executionId int32, execution Execution, localVarOptionals *PreheatApiStopExecutionOpts) (*http.Response, error)

func (*PreheatApiService) UpdateInstance

func (a *PreheatApiService) UpdateInstance(preheatInstanceName string, instance Instance, localVarOptionals *PreheatApiUpdateInstanceOpts) (*http.Response, error)

func (*PreheatApiService) UpdatePolicy

func (a *PreheatApiService) UpdatePolicy(projectName string, preheatPolicyName string, policy PreheatPolicy, localVarOptionals *PreheatApiUpdatePolicyOpts) (*http.Response, error)

type PreheatApiStopExecutionOpts

type PreheatApiStopExecutionOpts struct {
	XRequestId optional.String
}

type PreheatApiUpdateInstanceOpts

type PreheatApiUpdateInstanceOpts struct {
	XRequestId optional.String
}

type PreheatApiUpdatePolicyOpts

type PreheatApiUpdatePolicyOpts struct {
	XRequestId optional.String
}

type PreheatPolicy

type PreheatPolicy struct {
	// The ID of preheat policy
	Id int32 `json:"id,omitempty"`
	// The Name of preheat policy
	Name string `json:"name,omitempty"`
	// The Description of preheat policy
	Description string `json:"description,omitempty"`
	// The ID of preheat policy project
	ProjectId int32 `json:"project_id,omitempty"`
	// The ID of preheat policy provider
	ProviderId int32 `json:"provider_id,omitempty"`
	// The Name of preheat policy provider
	ProviderName string `json:"provider_name,omitempty"`
	// The Filters of preheat policy
	Filters string `json:"filters,omitempty"`
	// The Trigger of preheat policy
	Trigger string `json:"trigger,omitempty"`
	// Whether the preheat policy enabled
	Enabled bool `json:"enabled,omitempty"`
	// The Create Time of preheat policy
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The Update Time of preheat policy
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type Project

type Project struct {
	// Project ID
	ProjectId int32 `json:"project_id,omitempty"`
	// The owner ID of the project always means the creator of the project.
	OwnerId int32 `json:"owner_id,omitempty"`
	// The name of the project.
	Name string `json:"name,omitempty"`
	// The ID of referenced registry when the project is a proxy cache project.
	RegistryId int64 `json:"registry_id,omitempty"`
	// The creation time of the project.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the project.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// A deletion mark of the project.
	Deleted bool `json:"deleted,omitempty"`
	// The owner name of the project.
	OwnerName string `json:"owner_name,omitempty"`
	// Correspond to the UI about whether the project's publicity is  updatable (for UI)
	Togglable bool `json:"togglable,omitempty"`
	// The role ID with highest permission of the current user who triggered the API (for UI).  This attribute is deprecated and will be removed in future versions.
	CurrentUserRoleId int32 `json:"current_user_role_id,omitempty"`
	// The list of role ID of the current user who triggered the API (for UI)
	CurrentUserRoleIds []int32 `json:"current_user_role_ids,omitempty"`
	// The number of the repositories under this project.
	RepoCount int32 `json:"repo_count,omitempty"`
	// The total number of charts under this project.
	ChartCount int32 `json:"chart_count,omitempty"`
	// The metadata of the project.
	Metadata *ProjectMetadata `json:"metadata,omitempty"`
	// The CVE allowlist of this project.
	CveAllowlist *CveAllowlist `json:"cve_allowlist,omitempty"`
}

type ProjectApiCreateProjectOpts

type ProjectApiCreateProjectOpts struct {
	XRequestId              optional.String
	XResourceNameInLocation optional.Bool
}

type ProjectApiDeleteProjectOpts

type ProjectApiDeleteProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiGetLogsOpts

type ProjectApiGetLogsOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type ProjectApiGetProjectDeletableOpts

type ProjectApiGetProjectDeletableOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiGetProjectOpts

type ProjectApiGetProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiGetProjectSummaryOpts

type ProjectApiGetProjectSummaryOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiGetScannerOfProjectOpts

type ProjectApiGetScannerOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiHeadProjectOpts

type ProjectApiHeadProjectOpts struct {
	XRequestId optional.String
}

type ProjectApiListProjectsOpts

type ProjectApiListProjectsOpts struct {
	XRequestId optional.String
	Q          optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Sort       optional.String
	Name       optional.String
	Public     optional.Bool
	Owner      optional.String
	WithDetail optional.Bool
}

type ProjectApiListScannerCandidatesOfProjectOpts

type ProjectApiListScannerCandidatesOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Q               optional.String
	Sort            optional.String
	Page            optional.Int64
	PageSize        optional.Int64
}

type ProjectApiService

type ProjectApiService service

func (*ProjectApiService) CreateProject

func (a *ProjectApiService) CreateProject(project ProjectReq, localVarOptionals *ProjectApiCreateProjectOpts) (*http.Response, error)

func (*ProjectApiService) DeleteProject

func (a *ProjectApiService) DeleteProject(projectNameOrId string, localVarOptionals *ProjectApiDeleteProjectOpts) (*http.Response, error)

func (*ProjectApiService) GetLogs

func (a *ProjectApiService) GetLogs(projectName string, localVarOptionals *ProjectApiGetLogsOpts) ([]AuditLog, *http.Response, error)

func (*ProjectApiService) GetProject

func (a *ProjectApiService) GetProject(projectNameOrId string, localVarOptionals *ProjectApiGetProjectOpts) (Project, *http.Response, error)

func (*ProjectApiService) GetProjectDeletable

func (a *ProjectApiService) GetProjectDeletable(projectNameOrId string, localVarOptionals *ProjectApiGetProjectDeletableOpts) (ProjectDeletable, *http.Response, error)

func (*ProjectApiService) GetProjectSummary

func (a *ProjectApiService) GetProjectSummary(projectNameOrId string, localVarOptionals *ProjectApiGetProjectSummaryOpts) (ProjectSummary, *http.Response, error)

func (*ProjectApiService) GetScannerOfProject

func (a *ProjectApiService) GetScannerOfProject(projectNameOrId string, localVarOptionals *ProjectApiGetScannerOfProjectOpts) (ScannerRegistration, *http.Response, error)

func (*ProjectApiService) HeadProject

func (a *ProjectApiService) HeadProject(projectName string, localVarOptionals *ProjectApiHeadProjectOpts) (*http.Response, error)

func (*ProjectApiService) ListProjects

func (a *ProjectApiService) ListProjects(localVarOptionals *ProjectApiListProjectsOpts) ([]Project, *http.Response, error)

func (*ProjectApiService) ListScannerCandidatesOfProject

func (a *ProjectApiService) ListScannerCandidatesOfProject(projectNameOrId string, localVarOptionals *ProjectApiListScannerCandidatesOfProjectOpts) ([]ScannerRegistration, *http.Response, error)

func (*ProjectApiService) SetScannerOfProject

func (a *ProjectApiService) SetScannerOfProject(projectNameOrId string, payload ProjectScanner, localVarOptionals *ProjectApiSetScannerOfProjectOpts) (*http.Response, error)

func (*ProjectApiService) UpdateProject

func (a *ProjectApiService) UpdateProject(projectNameOrId string, project ProjectReq, localVarOptionals *ProjectApiUpdateProjectOpts) (*http.Response, error)

type ProjectApiSetScannerOfProjectOpts

type ProjectApiSetScannerOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectApiUpdateProjectOpts

type ProjectApiUpdateProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectDeletable

type ProjectDeletable struct {
	// Whether the project can be deleted.
	Deletable bool `json:"deletable,omitempty"`
	// The detail message when the project can not be deleted.
	Message string `json:"message,omitempty"`
}

type ProjectMember

type ProjectMember struct {
	// The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for maintainer
	RoleId      int32       `json:"role_id,omitempty"`
	MemberUser  *UserEntity `json:"member_user,omitempty"`
	MemberGroup *UserGroup  `json:"member_group,omitempty"`
}

type ProjectMemberEntity

type ProjectMemberEntity struct {
	// the project member id
	Id int32 `json:"id,omitempty"`
	// the project id
	ProjectId int32 `json:"project_id,omitempty"`
	// the name of the group member.
	EntityName string `json:"entity_name,omitempty"`
	// the name of the role
	RoleName string `json:"role_name,omitempty"`
	// the role id
	RoleId int32 `json:"role_id,omitempty"`
	// the id of entity, if the member is a user, it is user_id in user table. if the member is a user group, it is the user group's ID in user_group table.
	EntityId int32 `json:"entity_id,omitempty"`
	// the entity's type, u for user entity, g for group entity.
	EntityType string `json:"entity_type,omitempty"`
}

type ProjectMetadata

type ProjectMetadata struct {
	// The public status of the project. The valid values are \"true\", \"false\".
	Public string `json:"public,omitempty"`
	// Whether content trust is enabled or not. If it is enabled, user can't pull unsigned images from this project. The valid values are \"true\", \"false\".
	EnableContentTrust string `json:"enable_content_trust,omitempty"`
	// Whether prevent the vulnerable images from running. The valid values are \"true\", \"false\".
	PreventVul string `json:"prevent_vul,omitempty"`
	// If the vulnerability is high than severity defined here, the images can't be pulled. The valid values are \"none\", \"low\", \"medium\", \"high\", \"critical\".
	Severity string `json:"severity,omitempty"`
	// Whether scan images automatically when pushing. The valid values are \"true\", \"false\".
	AutoScan string `json:"auto_scan,omitempty"`
	// Whether this project reuse the system level CVE allowlist as the allowlist of its own.  The valid values are \"true\", \"false\". If it is set to \"true\" the actual allowlist associate with this project, if any, will be ignored.
	ReuseSysCveAllowlist string `json:"reuse_sys_cve_allowlist,omitempty"`
	// The ID of the tag retention policy for the project
	RetentionId string `json:"retention_id,omitempty"`
}

type ProjectMetadataApiAddProjectMetadatasOpts

type ProjectMetadataApiAddProjectMetadatasOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Metadata        optional.Interface
}

type ProjectMetadataApiDeleteProjectMetadataOpts

type ProjectMetadataApiDeleteProjectMetadataOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectMetadataApiGetProjectMetadataOpts

type ProjectMetadataApiGetProjectMetadataOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectMetadataApiListProjectMetadatasOpts

type ProjectMetadataApiListProjectMetadatasOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type ProjectMetadataApiService

type ProjectMetadataApiService service

func (*ProjectMetadataApiService) AddProjectMetadatas

func (a *ProjectMetadataApiService) AddProjectMetadatas(projectNameOrId string, localVarOptionals *ProjectMetadataApiAddProjectMetadatasOpts) (*http.Response, error)

func (*ProjectMetadataApiService) DeleteProjectMetadata

func (a *ProjectMetadataApiService) DeleteProjectMetadata(projectNameOrId string, metaName string, localVarOptionals *ProjectMetadataApiDeleteProjectMetadataOpts) (*http.Response, error)

func (*ProjectMetadataApiService) GetProjectMetadata

func (a *ProjectMetadataApiService) GetProjectMetadata(projectNameOrId string, metaName string, localVarOptionals *ProjectMetadataApiGetProjectMetadataOpts) (map[string]string, *http.Response, error)

func (*ProjectMetadataApiService) ListProjectMetadatas

func (a *ProjectMetadataApiService) ListProjectMetadatas(projectNameOrId string, localVarOptionals *ProjectMetadataApiListProjectMetadatasOpts) (map[string]string, *http.Response, error)

func (*ProjectMetadataApiService) UpdateProjectMetadata

func (a *ProjectMetadataApiService) UpdateProjectMetadata(projectNameOrId string, metaName string, localVarOptionals *ProjectMetadataApiUpdateProjectMetadataOpts) (*http.Response, error)

type ProjectMetadataApiUpdateProjectMetadataOpts

type ProjectMetadataApiUpdateProjectMetadataOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Metadata        optional.Interface
}

type ProjectReq

type ProjectReq struct {
	// The name of the project.
	ProjectName string `json:"project_name,omitempty"`
	// deprecated, reserved for project creation in replication
	Public bool `json:"public,omitempty"`
	// The metadata of the project.
	Metadata *ProjectMetadata `json:"metadata,omitempty"`
	// The CVE allowlist of the project.
	CveAllowlist *CveAllowlist `json:"cve_allowlist,omitempty"`
	// The storage quota of the project.
	StorageLimit int64 `json:"storage_limit,omitempty"`
	// The ID of referenced registry when creating the proxy cache project
	RegistryId int64 `json:"registry_id,omitempty"`
}

type ProjectScanner

type ProjectScanner struct {
	// The identifier of the scanner registration
	Uuid string `json:"uuid"`
}

type ProjectSummary

type ProjectSummary struct {
	// The number of the repositories under this project.
	RepoCount int32 `json:"repo_count,omitempty"`
	// The total number of charts under this project.
	ChartCount int32 `json:"chart_count,omitempty"`
	// The total number of project admin members.
	ProjectAdminCount int32 `json:"project_admin_count,omitempty"`
	// The total number of maintainer members.
	MaintainerCount int32 `json:"maintainer_count,omitempty"`
	// The total number of developer members.
	DeveloperCount int32 `json:"developer_count,omitempty"`
	// The total number of guest members.
	GuestCount int32 `json:"guest_count,omitempty"`
	// The total number of limited guest members.
	LimitedGuestCount int32                `json:"limited_guest_count,omitempty"`
	Quota             *ProjectSummaryQuota `json:"quota,omitempty"`
	Registry          *Registry            `json:"registry,omitempty"`
}

type ProjectSummaryQuota

type ProjectSummaryQuota struct {
	// The hard limits of the quota
	Hard *ResourceList `json:"hard,omitempty"`
	// The used status of the quota
	Used *ResourceList `json:"used,omitempty"`
}

type ProviderUnderProject

type ProviderUnderProject struct {
	Id       int32  `json:"id,omitempty"`
	Provider string `json:"provider,omitempty"`
	Enabled  bool   `json:"enabled,omitempty"`
	Default_ bool   `json:"default,omitempty"`
}

type Quota

type Quota struct {
	// ID of the quota
	Id int32 `json:"id,omitempty"`
	// The reference object of the quota
	Ref *QuotaRefObject `json:"ref,omitempty"`
	// The hard limits of the quota
	Hard *ResourceList `json:"hard,omitempty"`
	// The used status of the quota
	Used *ResourceList `json:"used,omitempty"`
	// the creation time of the quota
	CreationTime time.Time `json:"creation_time,omitempty"`
	// the update time of the quota
	UpdateTime time.Time `json:"update_time,omitempty"`
}

The quota object

type QuotaApiGetQuotaOpts

type QuotaApiGetQuotaOpts struct {
	XRequestId optional.String
}

type QuotaApiListQuotasOpts

type QuotaApiListQuotasOpts struct {
	XRequestId  optional.String
	Page        optional.Int64
	PageSize    optional.Int64
	Reference   optional.String
	ReferenceId optional.String
	Sort        optional.String
}

type QuotaApiService

type QuotaApiService service

func (*QuotaApiService) GetQuota

func (a *QuotaApiService) GetQuota(id int32, localVarOptionals *QuotaApiGetQuotaOpts) (Quota, *http.Response, error)

func (*QuotaApiService) ListQuotas

func (a *QuotaApiService) ListQuotas(localVarOptionals *QuotaApiListQuotasOpts) ([]Quota, *http.Response, error)

func (*QuotaApiService) UpdateQuota

func (a *QuotaApiService) UpdateQuota(id int32, hard QuotaUpdateReq, localVarOptionals *QuotaApiUpdateQuotaOpts) (*http.Response, error)

type QuotaApiUpdateQuotaOpts

type QuotaApiUpdateQuotaOpts struct {
	XRequestId optional.String
}

type QuotaRefObject

type QuotaRefObject struct {
}

type QuotaUpdateReq

type QuotaUpdateReq struct {
	// The new hard limits for the quota
	Hard *ResourceList `json:"hard,omitempty"`
}

type Reference

type Reference struct {
	// The parent ID of the reference
	ParentId int64 `json:"parent_id,omitempty"`
	// The child ID of the reference
	ChildId int64 `json:"child_id,omitempty"`
	// The digest of the child artifact
	ChildDigest string       `json:"child_digest,omitempty"`
	Platform    *Platform    `json:"platform,omitempty"`
	Annotations *Annotations `json:"annotations,omitempty"`
	// The download URLs
	Urls []string `json:"urls,omitempty"`
}

type Registry

type Registry struct {
	// The registry ID.
	Id int64 `json:"id,omitempty"`
	// The registry URL string.
	Url string `json:"url,omitempty"`
	// The registry name.
	Name       string              `json:"name,omitempty"`
	Credential *RegistryCredential `json:"credential,omitempty"`
	// Type of the registry, e.g. 'harbor'.
	Type_ string `json:"type,omitempty"`
	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure,omitempty"`
	// Description of the registry.
	Description string `json:"description,omitempty"`
	// Health status of the registry.
	Status string `json:"status,omitempty"`
	// The create time of the policy.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the policy.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type RegistryApiCreateRegistryOpts

type RegistryApiCreateRegistryOpts struct {
	XRequestId optional.String
}

type RegistryApiDeleteRegistryOpts

type RegistryApiDeleteRegistryOpts struct {
	XRequestId optional.String
}

type RegistryApiGetRegistryInfoOpts

type RegistryApiGetRegistryInfoOpts struct {
	XRequestId optional.String
}

type RegistryApiGetRegistryOpts

type RegistryApiGetRegistryOpts struct {
	XRequestId optional.String
}

type RegistryApiListRegistriesOpts

type RegistryApiListRegistriesOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Name       optional.String
}

type RegistryApiListRegistryProviderInfosOpts

type RegistryApiListRegistryProviderInfosOpts struct {
	XRequestId optional.String
}

type RegistryApiListRegistryProviderTypesOpts

type RegistryApiListRegistryProviderTypesOpts struct {
	XRequestId optional.String
}

type RegistryApiPingRegistryOpts

type RegistryApiPingRegistryOpts struct {
	XRequestId optional.String
}

type RegistryApiService

type RegistryApiService service

func (*RegistryApiService) CreateRegistry

func (a *RegistryApiService) CreateRegistry(registry Registry, localVarOptionals *RegistryApiCreateRegistryOpts) (*http.Response, error)

func (*RegistryApiService) DeleteRegistry

func (a *RegistryApiService) DeleteRegistry(id int64, localVarOptionals *RegistryApiDeleteRegistryOpts) (*http.Response, error)

func (*RegistryApiService) GetRegistry

func (a *RegistryApiService) GetRegistry(id int64, localVarOptionals *RegistryApiGetRegistryOpts) (Registry, *http.Response, error)

func (*RegistryApiService) GetRegistryInfo

func (a *RegistryApiService) GetRegistryInfo(id int64, localVarOptionals *RegistryApiGetRegistryInfoOpts) (RegistryInfo, *http.Response, error)

func (*RegistryApiService) ListRegistries

func (a *RegistryApiService) ListRegistries(localVarOptionals *RegistryApiListRegistriesOpts) ([]Registry, *http.Response, error)

func (*RegistryApiService) ListRegistryProviderInfos

func (a *RegistryApiService) ListRegistryProviderInfos(localVarOptionals *RegistryApiListRegistryProviderInfosOpts) (map[string]RegistryProviderInfo, *http.Response, error)

func (*RegistryApiService) ListRegistryProviderTypes

func (a *RegistryApiService) ListRegistryProviderTypes(localVarOptionals *RegistryApiListRegistryProviderTypesOpts) ([]string, *http.Response, error)

func (*RegistryApiService) PingRegistry

func (a *RegistryApiService) PingRegistry(registry RegistryPing, localVarOptionals *RegistryApiPingRegistryOpts) (*http.Response, error)

func (*RegistryApiService) UpdateRegistry

func (a *RegistryApiService) UpdateRegistry(id int64, registry RegistryUpdate, localVarOptionals *RegistryApiUpdateRegistryOpts) (*http.Response, error)

type RegistryApiUpdateRegistryOpts

type RegistryApiUpdateRegistryOpts struct {
	XRequestId optional.String
}

type RegistryCredential

type RegistryCredential struct {
	// Credential type, such as 'basic', 'oauth'.
	Type_ string `json:"type,omitempty"`
	// Access key, e.g. user name when credential type is 'basic'.
	AccessKey string `json:"access_key,omitempty"`
	// Access secret, e.g. password when credential type is 'basic'.
	AccessSecret string `json:"access_secret,omitempty"`
}

type RegistryEndpoint

type RegistryEndpoint struct {
	// The endpoint key
	Key string `json:"key,omitempty"`
	// The endpoint value
	Value string `json:"value,omitempty"`
}

The style of the resource filter

type RegistryInfo

type RegistryInfo struct {
	// The registry type
	Type_ string `json:"type,omitempty"`
	// The description
	Description string `json:"description,omitempty"`
	// The filters that the registry supports
	SupportedResourceFilters []FilterStyle `json:"supported_resource_filters,omitempty"`
	// The triggers that the registry supports
	SupportedTriggers []string `json:"supported_triggers,omitempty"`
}

The registry info contains the base info and capability declarations of the registry

type RegistryPing

type RegistryPing struct {
	// The registry ID.
	Id int64 `json:"id,omitempty"`
	// Type of the registry, e.g. 'harbor'.
	Type_ string `json:"type,omitempty"`
	// The registry URL.
	Url string `json:"url,omitempty"`
	// Credential type of the registry, e.g. 'basic'.
	CredentialType string `json:"credential_type,omitempty"`
	// The registry access key.
	AccessKey string `json:"access_key,omitempty"`
	// The registry access secret.
	AccessSecret string `json:"access_secret,omitempty"`
	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure,omitempty"`
}

type RegistryProviderCredentialPattern

type RegistryProviderCredentialPattern struct {
	// The access key type
	AccessKeyType string `json:"access_key_type,omitempty"`
	// The access key data
	AccessKeyData string `json:"access_key_data,omitempty"`
	// The access secret type
	AccessSecretType string `json:"access_secret_type,omitempty"`
	// The access secret data
	AccessSecretData string `json:"access_secret_data,omitempty"`
}

The registry credential pattern

type RegistryProviderEndpointPattern

type RegistryProviderEndpointPattern struct {
	// The endpoint type
	EndpointType string `json:"endpoint_type,omitempty"`
	// The endpoint list
	Endpoints []RegistryEndpoint `json:"endpoints,omitempty"`
}

The registry endpoint pattern

type RegistryProviderInfo

type RegistryProviderInfo struct {
	// The endpoint pattern
	EndpointPattern *RegistryProviderEndpointPattern `json:"endpoint_pattern,omitempty"`
	// The credential pattern
	CredentialPattern *RegistryProviderCredentialPattern `json:"credential_pattern,omitempty"`
}

The registry provider info contains the base info and capability declarations of the registry provider

type RegistryUpdate

type RegistryUpdate struct {
	// The registry name.
	Name string `json:"name,omitempty"`
	// Description of the registry.
	Description string `json:"description,omitempty"`
	// The registry URL.
	Url string `json:"url,omitempty"`
	// Credential type of the registry, e.g. 'basic'.
	CredentialType string `json:"credential_type,omitempty"`
	// The registry access key.
	AccessKey string `json:"access_key,omitempty"`
	// The registry access secret.
	AccessSecret string `json:"access_secret,omitempty"`
	// Whether or not the certificate will be verified when Harbor tries to access the server.
	Insecure bool `json:"insecure,omitempty"`
}

type ReplicationApiCreateReplicationPolicyOpts

type ReplicationApiCreateReplicationPolicyOpts struct {
	XRequestId optional.String
}

type ReplicationApiDeleteReplicationPolicyOpts

type ReplicationApiDeleteReplicationPolicyOpts struct {
	XRequestId optional.String
}

type ReplicationApiGetReplicationExecutionOpts

type ReplicationApiGetReplicationExecutionOpts struct {
	XRequestId optional.String
}

type ReplicationApiGetReplicationLogOpts

type ReplicationApiGetReplicationLogOpts struct {
	XRequestId optional.String
}

type ReplicationApiGetReplicationPolicyOpts

type ReplicationApiGetReplicationPolicyOpts struct {
	XRequestId optional.String
}

type ReplicationApiListReplicationExecutionsOpts

type ReplicationApiListReplicationExecutionsOpts struct {
	XRequestId optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	PolicyId   optional.Int32
	Status     optional.String
	Trigger    optional.String
}

type ReplicationApiListReplicationPoliciesOpts

type ReplicationApiListReplicationPoliciesOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
	Name       optional.String
}

type ReplicationApiListReplicationTasksOpts

type ReplicationApiListReplicationTasksOpts struct {
	XRequestId   optional.String
	Sort         optional.String
	Page         optional.Int64
	PageSize     optional.Int64
	Status       optional.String
	ResourceType optional.String
}

type ReplicationApiService

type ReplicationApiService service

func (*ReplicationApiService) CreateReplicationPolicy

func (a *ReplicationApiService) CreateReplicationPolicy(policy ReplicationPolicy, localVarOptionals *ReplicationApiCreateReplicationPolicyOpts) (*http.Response, error)

func (*ReplicationApiService) DeleteReplicationPolicy

func (a *ReplicationApiService) DeleteReplicationPolicy(id int64, localVarOptionals *ReplicationApiDeleteReplicationPolicyOpts) (*http.Response, error)

func (*ReplicationApiService) GetReplicationExecution

func (a *ReplicationApiService) GetReplicationExecution(id int64, localVarOptionals *ReplicationApiGetReplicationExecutionOpts) (ReplicationExecution, *http.Response, error)

func (*ReplicationApiService) GetReplicationLog

func (a *ReplicationApiService) GetReplicationLog(id int64, taskId int64, localVarOptionals *ReplicationApiGetReplicationLogOpts) (string, *http.Response, error)

func (*ReplicationApiService) GetReplicationPolicy

func (a *ReplicationApiService) GetReplicationPolicy(id int64, localVarOptionals *ReplicationApiGetReplicationPolicyOpts) (ReplicationPolicy, *http.Response, error)

func (*ReplicationApiService) ListReplicationExecutions

func (a *ReplicationApiService) ListReplicationExecutions(localVarOptionals *ReplicationApiListReplicationExecutionsOpts) ([]ReplicationExecution, *http.Response, error)

func (*ReplicationApiService) ListReplicationPolicies

func (a *ReplicationApiService) ListReplicationPolicies(localVarOptionals *ReplicationApiListReplicationPoliciesOpts) ([]ReplicationPolicy, *http.Response, error)

func (*ReplicationApiService) ListReplicationTasks

func (a *ReplicationApiService) ListReplicationTasks(id int64, localVarOptionals *ReplicationApiListReplicationTasksOpts) ([]ReplicationTask, *http.Response, error)

func (*ReplicationApiService) StartReplication

func (a *ReplicationApiService) StartReplication(execution StartReplicationExecution, localVarOptionals *ReplicationApiStartReplicationOpts) (*http.Response, error)

func (*ReplicationApiService) StopReplication

func (a *ReplicationApiService) StopReplication(id int64, localVarOptionals *ReplicationApiStopReplicationOpts) (*http.Response, error)

func (*ReplicationApiService) UpdateReplicationPolicy

func (a *ReplicationApiService) UpdateReplicationPolicy(id int64, policy ReplicationPolicy, localVarOptionals *ReplicationApiUpdateReplicationPolicyOpts) (*http.Response, error)

type ReplicationApiStartReplicationOpts

type ReplicationApiStartReplicationOpts struct {
	XRequestId optional.String
}

type ReplicationApiStopReplicationOpts

type ReplicationApiStopReplicationOpts struct {
	XRequestId optional.String
}

type ReplicationApiUpdateReplicationPolicyOpts

type ReplicationApiUpdateReplicationPolicyOpts struct {
	XRequestId optional.String
}

type ReplicationExecution

type ReplicationExecution struct {
	// The ID of the execution
	Id int32 `json:"id,omitempty"`
	// The ID if the policy that the execution belongs to
	PolicyId int32 `json:"policy_id,omitempty"`
	// The status of the execution
	Status string `json:"status,omitempty"`
	// The trigger mode
	Trigger string `json:"trigger,omitempty"`
	// The start time
	StartTime time.Time `json:"start_time,omitempty"`
	// The end time
	EndTime time.Time `json:"end_time,omitempty"`
	// The status text
	StatusText string `json:"status_text,omitempty"`
	// The total count of all executions
	Total int32 `json:"total,omitempty"`
	// The count of failed executions
	Failed int32 `json:"failed,omitempty"`
	// The count of succeed executions
	Succeed int32 `json:"succeed,omitempty"`
	// The count of in_progress executions
	InProgress int32 `json:"in_progress,omitempty"`
	// The count of stopped executions
	Stopped int32 `json:"stopped,omitempty"`
}

The replication execution

type ReplicationFilter

type ReplicationFilter struct {
	// The replication policy filter type.
	Type_ string `json:"type,omitempty"`
	// The value of replication policy filter.
	Value interface{} `json:"value,omitempty"`
	// matches or excludes the result
	Decoration string `json:"decoration,omitempty"`
}

type ReplicationPolicy

type ReplicationPolicy struct {
	// The policy ID.
	Id int64 `json:"id,omitempty"`
	// The policy name.
	Name string `json:"name,omitempty"`
	// The description of the policy.
	Description string `json:"description,omitempty"`
	// The source registry.
	SrcRegistry *Registry `json:"src_registry,omitempty"`
	// The destination registry.
	DestRegistry *Registry `json:"dest_registry,omitempty"`
	// The destination namespace.
	DestNamespace string `json:"dest_namespace,omitempty"`
	// Specify how many path components will be replaced by the provided destination namespace. The default value is -1 in which case the legacy mode will be applied.
	DestNamespaceReplaceCount int32               `json:"dest_namespace_replace_count,omitempty"`
	Trigger                   *ReplicationTrigger `json:"trigger,omitempty"`
	// The replication policy filter array.
	Filters []ReplicationFilter `json:"filters,omitempty"`
	// Whether to replicate the deletion operation.
	ReplicateDeletion bool `json:"replicate_deletion,omitempty"`
	// Deprecated, use \"replicate_deletion\" instead. Whether to replicate the deletion operation.
	Deletion bool `json:"deletion,omitempty"`
	// Whether to override the resources on the destination registry.
	Override bool `json:"override,omitempty"`
	// Whether the policy is enabled or not.
	Enabled bool `json:"enabled,omitempty"`
	// The create time of the policy.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the policy.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type ReplicationTask

type ReplicationTask struct {
	// The ID of the task
	Id int32 `json:"id,omitempty"`
	// The ID of the execution that the task belongs to
	ExecutionId int32 `json:"execution_id,omitempty"`
	// The status of the task
	Status string `json:"status,omitempty"`
	// The ID of the underlying job that the task related to
	JobId string `json:"job_id,omitempty"`
	// The operation of the task
	Operation string `json:"operation,omitempty"`
	// The type of the resource that the task operates
	ResourceType string `json:"resource_type,omitempty"`
	// The source resource that the task operates
	SrcResource string `json:"src_resource,omitempty"`
	// The destination resource that the task operates
	DstResource string `json:"dst_resource,omitempty"`
	// The start time of the task
	StartTime time.Time `json:"start_time,omitempty"`
	// The end time of the task
	EndTime time.Time `json:"end_time,omitempty"`
}

The replication task

type ReplicationTrigger

type ReplicationTrigger struct {
	// The replication policy trigger type. The valid values are manual, event_based and scheduled.
	Type_           string                      `json:"type,omitempty"`
	TriggerSettings *ReplicationTriggerSettings `json:"trigger_settings,omitempty"`
}

type ReplicationTriggerSettings

type ReplicationTriggerSettings struct {
	// The cron string for scheduled trigger
	Cron string `json:"cron,omitempty"`
}

type Repository

type Repository struct {
	// The ID of the repository
	Id int64 `json:"id,omitempty"`
	// The ID of the project that the repository belongs to
	ProjectId int64 `json:"project_id,omitempty"`
	// The name of the repository
	Name string `json:"name,omitempty"`
	// The description of the repository
	Description string `json:"description,omitempty"`
	// The count of the artifacts inside the repository
	ArtifactCount int64 `json:"artifact_count,omitempty"`
	// The count that the artifact inside the repository pulled
	PullCount int64 `json:"pull_count,omitempty"`
	// The creation time of the repository
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the repository
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type RepositoryApiDeleteRepositoryOpts

type RepositoryApiDeleteRepositoryOpts struct {
	XRequestId optional.String
}

type RepositoryApiGetRepositoryOpts

type RepositoryApiGetRepositoryOpts struct {
	XRequestId optional.String
}

type RepositoryApiListAllRepositoriesOpts

type RepositoryApiListAllRepositoriesOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type RepositoryApiListRepositoriesOpts

type RepositoryApiListRepositoriesOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type RepositoryApiService

type RepositoryApiService service

func (*RepositoryApiService) DeleteRepository

func (a *RepositoryApiService) DeleteRepository(projectName string, repositoryName string, localVarOptionals *RepositoryApiDeleteRepositoryOpts) (*http.Response, error)

func (*RepositoryApiService) GetRepository

func (a *RepositoryApiService) GetRepository(projectName string, repositoryName string, localVarOptionals *RepositoryApiGetRepositoryOpts) (Repository, *http.Response, error)

func (*RepositoryApiService) ListAllRepositories

func (a *RepositoryApiService) ListAllRepositories(localVarOptionals *RepositoryApiListAllRepositoriesOpts) ([]Repository, *http.Response, error)

func (*RepositoryApiService) ListRepositories

func (a *RepositoryApiService) ListRepositories(projectName string, localVarOptionals *RepositoryApiListRepositoriesOpts) ([]Repository, *http.Response, error)

func (*RepositoryApiService) UpdateRepository

func (a *RepositoryApiService) UpdateRepository(projectName string, repositoryName string, repository Repository, localVarOptionals *RepositoryApiUpdateRepositoryOpts) (*http.Response, error)

type RepositoryApiUpdateRepositoryOpts

type RepositoryApiUpdateRepositoryOpts struct {
	XRequestId optional.String
}

type ResourceList

type ResourceList struct {
}

type RetentionExecution

type RetentionExecution struct {
	Id        int64  `json:"id,omitempty"`
	PolicyId  int64  `json:"policy_id,omitempty"`
	StartTime string `json:"start_time,omitempty"`
	EndTime   string `json:"end_time,omitempty"`
	Status    string `json:"status,omitempty"`
	Trigger   string `json:"trigger,omitempty"`
	DryRun    bool   `json:"dry_run,omitempty"`
}

type RetentionExecutionTask

type RetentionExecutionTask struct {
	Id             int64  `json:"id,omitempty"`
	ExecutionId    int64  `json:"execution_id,omitempty"`
	Repository     string `json:"repository,omitempty"`
	JobId          string `json:"job_id,omitempty"`
	Status         string `json:"status,omitempty"`
	StatusCode     int32  `json:"status_code,omitempty"`
	StatusRevision int64  `json:"status_revision,omitempty"`
	StartTime      string `json:"start_time,omitempty"`
	EndTime        string `json:"end_time,omitempty"`
	Total          int32  `json:"total,omitempty"`
	Retained       int32  `json:"retained,omitempty"`
}

type RetentionMetadata

type RetentionMetadata struct {
	// templates
	Templates []RetentionRuleMetadata `json:"templates,omitempty"`
	// supported scope selectors
	ScopeSelectors []RetentionSelectorMetadata `json:"scope_selectors,omitempty"`
	// supported tag selectors
	TagSelectors []RetentionSelectorMetadata `json:"tag_selectors,omitempty"`
}

the tag retention metadata

type RetentionPolicy

type RetentionPolicy struct {
	Id        int64                 `json:"id,omitempty"`
	Algorithm string                `json:"algorithm,omitempty"`
	Rules     []RetentionRule       `json:"rules,omitempty"`
	Trigger   *RetentionRuleTrigger `json:"trigger,omitempty"`
	Scope     *RetentionPolicyScope `json:"scope,omitempty"`
}

retention policy

type RetentionPolicyScope

type RetentionPolicyScope struct {
	Level string `json:"level,omitempty"`
	Ref   int32  `json:"ref,omitempty"`
}

type RetentionRule

type RetentionRule struct {
	Id             int32                          `json:"id,omitempty"`
	Priority       int32                          `json:"priority,omitempty"`
	Disabled       bool                           `json:"disabled,omitempty"`
	Action         string                         `json:"action,omitempty"`
	Template       string                         `json:"template,omitempty"`
	Params         map[string]interface{}         `json:"params,omitempty"`
	TagSelectors   []RetentionSelector            `json:"tag_selectors,omitempty"`
	ScopeSelectors map[string][]RetentionSelector `json:"scope_selectors,omitempty"`
}

type RetentionRuleMetadata

type RetentionRuleMetadata struct {
	// rule id
	RuleTemplate string `json:"rule_template,omitempty"`
	// rule display text
	DisplayText string `json:"display_text,omitempty"`
	// rule action
	Action string `json:"action,omitempty"`
	// rule params
	Params []RetentionRuleParamMetadata `json:"params,omitempty"`
}

the tag retention rule metadata

type RetentionRuleParamMetadata

type RetentionRuleParamMetadata struct {
	Type_    string `json:"type,omitempty"`
	Unit     string `json:"unit,omitempty"`
	Required bool   `json:"required,omitempty"`
}

rule param

type RetentionRuleTrigger

type RetentionRuleTrigger struct {
	Kind       string      `json:"kind,omitempty"`
	Settings   interface{} `json:"settings,omitempty"`
	References interface{} `json:"references,omitempty"`
}

type RetentionSelector

type RetentionSelector struct {
	Kind       string `json:"kind,omitempty"`
	Decoration string `json:"decoration,omitempty"`
	Pattern    string `json:"pattern,omitempty"`
	Extras     string `json:"extras,omitempty"`
}

type RetentionSelectorMetadata

type RetentionSelectorMetadata struct {
	DisplayText string   `json:"display_text,omitempty"`
	Kind        string   `json:"kind,omitempty"`
	Decorations []string `json:"decorations,omitempty"`
}

retention selector

type Robot

type Robot struct {
	// The ID of the robot
	Id int64 `json:"id,omitempty"`
	// The name of the tag
	Name string `json:"name,omitempty"`
	// The description of the robot
	Description string `json:"description,omitempty"`
	// The secret of the robot
	Secret string `json:"secret,omitempty"`
	// The level of the robot, project or system
	Level string `json:"level,omitempty"`
	// The duration of the robot in days
	Duration int64 `json:"duration,omitempty"`
	// The editable status of the robot
	Editable bool `json:"editable,omitempty"`
	// The disable status of the robot
	Disable bool `json:"disable,omitempty"`
	// The expiration data of the robot
	ExpiresAt   int64             `json:"expires_at,omitempty"`
	Permissions []RobotPermission `json:"permissions,omitempty"`
	// The creation time of the robot.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the robot.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type RobotApiCreateRobotOpts

type RobotApiCreateRobotOpts struct {
	XRequestId optional.String
}

type RobotApiDeleteRobotOpts

type RobotApiDeleteRobotOpts struct {
	XRequestId optional.String
}

type RobotApiGetRobotByIDOpts

type RobotApiGetRobotByIDOpts struct {
	XRequestId optional.String
}

type RobotApiListRobotOpts

type RobotApiListRobotOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type RobotApiRefreshSecOpts

type RobotApiRefreshSecOpts struct {
	XRequestId optional.String
}

type RobotApiService

type RobotApiService service

func (*RobotApiService) CreateRobot

func (a *RobotApiService) CreateRobot(robot RobotCreate, localVarOptionals *RobotApiCreateRobotOpts) (RobotCreated, *http.Response, error)

func (*RobotApiService) DeleteRobot

func (a *RobotApiService) DeleteRobot(robotId int32, localVarOptionals *RobotApiDeleteRobotOpts) (*http.Response, error)

func (*RobotApiService) GetRobotByID

func (a *RobotApiService) GetRobotByID(robotId int32, localVarOptionals *RobotApiGetRobotByIDOpts) (Robot, *http.Response, error)

func (*RobotApiService) ListRobot

func (a *RobotApiService) ListRobot(localVarOptionals *RobotApiListRobotOpts) ([]Robot, *http.Response, error)

func (*RobotApiService) RefreshSec

func (a *RobotApiService) RefreshSec(robotId int32, robotSec RobotSec, localVarOptionals *RobotApiRefreshSecOpts) (RobotSec, *http.Response, error)

func (*RobotApiService) UpdateRobot

func (a *RobotApiService) UpdateRobot(robotId int32, robot Robot, localVarOptionals *RobotApiUpdateRobotOpts) (*http.Response, error)

type RobotApiUpdateRobotOpts

type RobotApiUpdateRobotOpts struct {
	XRequestId optional.String
}

type RobotCreate

type RobotCreate struct {
	// The name of the tag
	Name string `json:"name,omitempty"`
	// The description of the robot
	Description string `json:"description,omitempty"`
	// The secret of the robot
	Secret string `json:"secret,omitempty"`
	// The level of the robot, project or system
	Level string `json:"level,omitempty"`
	// The disable status of the robot
	Disable bool `json:"disable,omitempty"`
	// The duration of the robot in days
	Duration    int64             `json:"duration,omitempty"`
	Permissions []RobotPermission `json:"permissions,omitempty"`
}

The request for robot account creation.

type RobotCreateV1

type RobotCreateV1 struct {
	// The name of robot account
	Name string `json:"name,omitempty"`
	// The description of robot account
	Description string `json:"description,omitempty"`
	// The expiration time on or after which the JWT MUST NOT be accepted for processing.
	ExpiresAt int32 `json:"expires_at,omitempty"`
	// The permission of robot account
	Access []Access `json:"access,omitempty"`
}

type RobotCreated

type RobotCreated struct {
	// The ID of the robot
	Id int64 `json:"id,omitempty"`
	// The name of the tag
	Name string `json:"name,omitempty"`
	// The secret of the robot
	Secret string `json:"secret,omitempty"`
	// The creation time of the robot.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The expiration data of the robot
	ExpiresAt int64 `json:"expires_at,omitempty"`
}

The response for robot account creation.

type RobotPermission

type RobotPermission struct {
	// The kind of the permission
	Kind string `json:"kind,omitempty"`
	// The namespace of the permission
	Namespace string   `json:"namespace,omitempty"`
	Access    []Access `json:"access,omitempty"`
}

type RobotSec

type RobotSec struct {
	// The secret of the robot
	Secret string `json:"secret,omitempty"`
}

The response for refresh/update robot account secret.

type Robotv1ApiCreateRobotV1Opts

type Robotv1ApiCreateRobotV1Opts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type Robotv1ApiDeleteRobotV1Opts

type Robotv1ApiDeleteRobotV1Opts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type Robotv1ApiGetRobotByIDV1Opts

type Robotv1ApiGetRobotByIDV1Opts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type Robotv1ApiListRobotV1Opts

type Robotv1ApiListRobotV1Opts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Page            optional.Int64
	PageSize        optional.Int64
	Q               optional.String
	Sort            optional.String
}

type Robotv1ApiService

type Robotv1ApiService service

func (*Robotv1ApiService) CreateRobotV1

func (a *Robotv1ApiService) CreateRobotV1(projectNameOrId string, robot RobotCreateV1, localVarOptionals *Robotv1ApiCreateRobotV1Opts) (RobotCreated, *http.Response, error)

func (*Robotv1ApiService) DeleteRobotV1

func (a *Robotv1ApiService) DeleteRobotV1(projectNameOrId string, robotId int32, localVarOptionals *Robotv1ApiDeleteRobotV1Opts) (*http.Response, error)

func (*Robotv1ApiService) GetRobotByIDV1

func (a *Robotv1ApiService) GetRobotByIDV1(projectNameOrId string, robotId int32, localVarOptionals *Robotv1ApiGetRobotByIDV1Opts) (Robot, *http.Response, error)

func (*Robotv1ApiService) ListRobotV1

func (a *Robotv1ApiService) ListRobotV1(projectNameOrId string, localVarOptionals *Robotv1ApiListRobotV1Opts) ([]Robot, *http.Response, error)

func (*Robotv1ApiService) UpdateRobotV1

func (a *Robotv1ApiService) UpdateRobotV1(projectNameOrId string, robotId int32, robot Robot, localVarOptionals *Robotv1ApiUpdateRobotV1Opts) (*http.Response, error)

type Robotv1ApiUpdateRobotV1Opts

type Robotv1ApiUpdateRobotV1Opts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type RoleRequest

type RoleRequest struct {
	// The role id 1 for projectAdmin, 2 for developer, 3 for guest, 4 for maintainer
	RoleId int32 `json:"role_id,omitempty"`
}

type ScanAllApiCreateScanAllScheduleOpts

type ScanAllApiCreateScanAllScheduleOpts struct {
	XRequestId optional.String
}

type ScanAllApiGetLatestScanAllMetricsOpts

type ScanAllApiGetLatestScanAllMetricsOpts struct {
	XRequestId optional.String
}

type ScanAllApiGetLatestScheduledScanAllMetricsOpts

type ScanAllApiGetLatestScheduledScanAllMetricsOpts struct {
	XRequestId optional.String
}

type ScanAllApiGetScanAllScheduleOpts

type ScanAllApiGetScanAllScheduleOpts struct {
	XRequestId optional.String
}

type ScanAllApiService

type ScanAllApiService service

func (*ScanAllApiService) CreateScanAllSchedule

func (a *ScanAllApiService) CreateScanAllSchedule(schedule Schedule, localVarOptionals *ScanAllApiCreateScanAllScheduleOpts) (*http.Response, error)

func (*ScanAllApiService) GetLatestScanAllMetrics

func (a *ScanAllApiService) GetLatestScanAllMetrics(localVarOptionals *ScanAllApiGetLatestScanAllMetricsOpts) (Stats, *http.Response, error)

func (*ScanAllApiService) GetLatestScheduledScanAllMetrics

func (a *ScanAllApiService) GetLatestScheduledScanAllMetrics(localVarOptionals *ScanAllApiGetLatestScheduledScanAllMetricsOpts) (Stats, *http.Response, error)

func (*ScanAllApiService) GetScanAllSchedule

func (a *ScanAllApiService) GetScanAllSchedule(localVarOptionals *ScanAllApiGetScanAllScheduleOpts) (Schedule, *http.Response, error)

func (*ScanAllApiService) UpdateScanAllSchedule

func (a *ScanAllApiService) UpdateScanAllSchedule(schedule Schedule, localVarOptionals *ScanAllApiUpdateScanAllScheduleOpts) (*http.Response, error)

type ScanAllApiUpdateScanAllScheduleOpts

type ScanAllApiUpdateScanAllScheduleOpts struct {
	XRequestId optional.String
}

type ScanApiGetReportLogOpts

type ScanApiGetReportLogOpts struct {
	XRequestId optional.String
}

type ScanApiScanArtifactOpts

type ScanApiScanArtifactOpts struct {
	XRequestId optional.String
}

type ScanApiService

type ScanApiService service

func (*ScanApiService) GetReportLog

func (a *ScanApiService) GetReportLog(projectName string, repositoryName string, reference string, reportId string, localVarOptionals *ScanApiGetReportLogOpts) (string, *http.Response, error)

func (*ScanApiService) ScanArtifact

func (a *ScanApiService) ScanArtifact(projectName string, repositoryName string, reference string, localVarOptionals *ScanApiScanArtifactOpts) (*http.Response, error)

type ScanOverview

type ScanOverview struct {
}

The scan overview attached in the metadata of tag

type Scanner

type Scanner struct {
	// Name of the scanner
	Name string `json:"name,omitempty"`
	// Name of the scanner provider
	Vendor string `json:"vendor,omitempty"`
	// Version of the scanner adapter
	Version string `json:"version,omitempty"`
}

type ScannerAdapterMetadata

type ScannerAdapterMetadata struct {
	Scanner      *Scanner            `json:"scanner,omitempty"`
	Capabilities []ScannerCapability `json:"capabilities,omitempty"`
	Properties   map[string]string   `json:"properties,omitempty"`
}

The metadata info of the scanner adapter

type ScannerApiCreateScannerOpts

type ScannerApiCreateScannerOpts struct {
	XRequestId optional.String
}

type ScannerApiDeleteScannerOpts

type ScannerApiDeleteScannerOpts struct {
	XRequestId optional.String
}

type ScannerApiGetScannerMetadataOpts

type ScannerApiGetScannerMetadataOpts struct {
	XRequestId optional.String
}

type ScannerApiGetScannerOpts

type ScannerApiGetScannerOpts struct {
	XRequestId optional.String
}

type ScannerApiListScannersOpts

type ScannerApiListScannersOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type ScannerApiPingScannerOpts

type ScannerApiPingScannerOpts struct {
	XRequestId optional.String
}

type ScannerApiService

type ScannerApiService service

func (*ScannerApiService) CreateScanner

func (a *ScannerApiService) CreateScanner(registration ScannerRegistrationReq, localVarOptionals *ScannerApiCreateScannerOpts) (*http.Response, error)

func (*ScannerApiService) DeleteScanner

func (a *ScannerApiService) DeleteScanner(registrationId string, localVarOptionals *ScannerApiDeleteScannerOpts) (ScannerRegistration, *http.Response, error)

func (*ScannerApiService) GetScanner

func (a *ScannerApiService) GetScanner(registrationId string, localVarOptionals *ScannerApiGetScannerOpts) (ScannerRegistration, *http.Response, error)

func (*ScannerApiService) GetScannerMetadata

func (a *ScannerApiService) GetScannerMetadata(registrationId string, localVarOptionals *ScannerApiGetScannerMetadataOpts) (ScannerAdapterMetadata, *http.Response, error)

func (*ScannerApiService) ListScanners

func (a *ScannerApiService) ListScanners(localVarOptionals *ScannerApiListScannersOpts) ([]ScannerRegistration, *http.Response, error)

func (*ScannerApiService) PingScanner

func (a *ScannerApiService) PingScanner(settings ScannerRegistrationSettings, localVarOptionals *ScannerApiPingScannerOpts) (*http.Response, error)

func (*ScannerApiService) SetScannerAsDefault

func (a *ScannerApiService) SetScannerAsDefault(registrationId string, payload IsDefault, localVarOptionals *ScannerApiSetScannerAsDefaultOpts) (*http.Response, error)

func (*ScannerApiService) UpdateScanner

func (a *ScannerApiService) UpdateScanner(registrationId string, registration ScannerRegistrationReq, localVarOptionals *ScannerApiUpdateScannerOpts) (*http.Response, error)

type ScannerApiSetScannerAsDefaultOpts

type ScannerApiSetScannerAsDefaultOpts struct {
	XRequestId optional.String
}

type ScannerApiUpdateScannerOpts

type ScannerApiUpdateScannerOpts struct {
	XRequestId optional.String
}

type ScannerCapability

type ScannerCapability struct {
	ConsumesMimeTypes []string `json:"consumes_mime_types,omitempty"`
	ProducesMimeTypes []string `json:"produces_mime_types,omitempty"`
}

type ScannerRegistration

type ScannerRegistration struct {
	// The unique identifier of this registration.
	Uuid string `json:"uuid,omitempty"`
	// The name of this registration.
	Name string `json:"name,omitempty"`
	// An optional description of this registration.
	Description string `json:"description,omitempty"`
	// A base URL of the scanner adapter
	Url string `json:"url,omitempty"`
	// Indicate whether the registration is enabled or not
	Disabled bool `json:"disabled,omitempty"`
	// Indicate if the registration is set as the system default one
	IsDefault bool `json:"is_default,omitempty"`
	// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"
	Auth string `json:"auth,omitempty"`
	// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
	AccessCredential string `json:"access_credential,omitempty"`
	// Indicate if skip the certificate verification when sending HTTP requests
	SkipCertVerify bool `json:"skip_certVerify,omitempty"`
	// Indicate whether use internal registry addr for the scanner to pull content or not
	UseInternalAddr bool `json:"use_internal_addr,omitempty"`
	// The creation time of this registration
	CreateTime time.Time `json:"create_time,omitempty"`
	// The update time of this registration
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Optional property to describe the name of the scanner registration
	Adapter string `json:"adapter,omitempty"`
	// Optional property to describe the vendor of the scanner registration
	Vendor string `json:"vendor,omitempty"`
	// Optional property to describe the version of the scanner registration
	Version string `json:"version,omitempty"`
	// Indicate the healthy of the registration
	Health string `json:"health,omitempty"`
}

Registration represents a named configuration for invoking a scanner via its adapter.

type ScannerRegistrationReq

type ScannerRegistrationReq struct {
	// The name of this registration
	Name string `json:"name"`
	// An optional description of this registration.
	Description string `json:"description,omitempty"`
	// A base URL of the scanner adapter.
	Url string `json:"url"`
	// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"
	Auth string `json:"auth,omitempty"`
	// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
	AccessCredential string `json:"access_credential,omitempty"`
	// Indicate if skip the certificate verification when sending HTTP requests
	SkipCertVerify bool `json:"skip_certVerify,omitempty"`
	// Indicate whether use internal registry addr for the scanner to pull content or not
	UseInternalAddr bool `json:"use_internal_addr,omitempty"`
	// Indicate whether the registration is enabled or not
	Disabled bool `json:"disabled,omitempty"`
}

type ScannerRegistrationSettings

type ScannerRegistrationSettings struct {
	// The name of this registration
	Name string `json:"name"`
	// A base URL of the scanner adapter.
	Url string `json:"url"`
	// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\"
	Auth string `json:"auth,omitempty"`
	// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API.
	AccessCredential string `json:"access_credential,omitempty"`
}

type Schedule

type Schedule struct {
	// The id of the schedule.
	Id int32 `json:"id,omitempty"`
	// The status of the schedule.
	Status string `json:"status,omitempty"`
	// the creation time of the schedule.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// the update time of the schedule.
	UpdateTime time.Time    `json:"update_time,omitempty"`
	Schedule   *ScheduleObj `json:"schedule,omitempty"`
	// The parameters of schedule job
	Parameters map[string]interface{} `json:"parameters,omitempty"`
}

type ScheduleObj

type ScheduleObj struct {
	// The schedule type. The valid values are 'Hourly', 'Daily', 'Weekly', 'Custom', 'Manual' and 'None'. 'Manual' means to trigger it right away and 'None' means to cancel the schedule.
	Type_ string `json:"type,omitempty"`
	// A cron expression, a time-based job scheduler.
	Cron string `json:"cron,omitempty"`
}
type Search struct {
	// Search results of the projects that matched the filter keywords.
	Project []Project `json:"project,omitempty"`
	// Search results of the repositories that matched the filter keywords.
	Repository []SearchRepository `json:"repository,omitempty"`
	// Search results of the charts that macthed the filter keywords.
	Chart []SearchResult `json:"chart,omitempty"`
}

type SearchApiSearchOpts

type SearchApiSearchOpts struct {
	XRequestId optional.String
}

type SearchApiService

type SearchApiService service

func (*SearchApiService) Search

func (a *SearchApiService) Search(q string, localVarOptionals *SearchApiSearchOpts) (Search, *http.Response, error)

type SearchRepository

type SearchRepository struct {
	// The ID of the project that the repository belongs to
	ProjectId int32 `json:"project_id,omitempty"`
	// The name of the project that the repository belongs to
	ProjectName string `json:"project_name,omitempty"`
	// The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)
	ProjectPublic bool `json:"project_public,omitempty"`
	// The name of the repository
	RepositoryName string `json:"repository_name,omitempty"`
	// The count how many times the repository is pulled
	PullCount int32 `json:"pull_count,omitempty"`
	// The count of artifacts in the repository
	ArtifactCount int32 `json:"artifact_count,omitempty"`
}

type SearchResult

type SearchResult struct {
	// The chart name with repo name
	Name string `json:"Name,omitempty"`
	// The matched level
	Score int32         `json:"Score,omitempty"`
	Chart *ChartVersion `json:"Chart,omitempty"`
}

The chart search result item

type StartReplicationExecution

type StartReplicationExecution struct {
	// The ID of policy that the execution belongs to.
	PolicyId int64 `json:"policy_id,omitempty"`
}

type Statistic

type Statistic struct {
	// The count of the private projects
	PrivateProjectCount int64 `json:"private_project_count,omitempty"`
	// The count of the private repositories
	PrivateRepoCount int64 `json:"private_repo_count,omitempty"`
	// The count of the public projects
	PublicProjectCount int64 `json:"public_project_count,omitempty"`
	// The count of the public repositories
	PublicRepoCount int64 `json:"public_repo_count,omitempty"`
	// The count of the total projects, only be seen by the system admin
	TotalProjectCount int64 `json:"total_project_count,omitempty"`
	// The count of the total repositories, only be seen by the system admin
	TotalRepoCount int64 `json:"total_repo_count,omitempty"`
	// The total storage consumption of blobs, only be seen by the system admin
	TotalStorageConsumption int64 `json:"total_storage_consumption,omitempty"`
}

type StatisticApiGetStatisticOpts

type StatisticApiGetStatisticOpts struct {
	XRequestId optional.String
}

type StatisticApiService

type StatisticApiService service

func (*StatisticApiService) GetStatistic

func (a *StatisticApiService) GetStatistic(localVarOptionals *StatisticApiGetStatisticOpts) (Statistic, *http.Response, error)

type Stats

type Stats struct {
	// The total number of scan processes triggered by the scan all action
	Total int32 `json:"total,omitempty"`
	// The number of the finished scan processes triggered by the scan all action
	Completed int32 `json:"completed,omitempty"`
	// The metrics data for the each status
	Metrics map[string]int32 `json:"metrics,omitempty"`
	// A flag indicating job status of scan all.
	Ongoing bool `json:"ongoing,omitempty"`
	// The trigger of the scan all job.
	Trigger string `json:"trigger,omitempty"`
}

Stats provides the overall progress of the scan all process.

type Storage

type Storage struct {
	// Total volume size.
	Total int32 `json:"total,omitempty"`
	// Free volume size.
	Free int32 `json:"free,omitempty"`
}

type StringConfigItem

type StringConfigItem struct {
	// The string value of current config item
	Value string `json:"value,omitempty"`
	// The configure item can be updated or not
	Editable bool `json:"editable,omitempty"`
}

type SupportedWebhookEventTypes

type SupportedWebhookEventTypes struct {
	EventType  []EventType  `json:"event_type,omitempty"`
	NotifyType []NotifyType `json:"notify_type,omitempty"`
}

Supportted webhook event types and notify types.

type SystemCVEAllowlistApiGetSystemCVEAllowlistOpts

type SystemCVEAllowlistApiGetSystemCVEAllowlistOpts struct {
	XRequestId optional.String
}

type SystemCVEAllowlistApiPutSystemCVEAllowlistOpts

type SystemCVEAllowlistApiPutSystemCVEAllowlistOpts struct {
	XRequestId optional.String
	Allowlist  optional.Interface
}

type SystemCVEAllowlistApiService

type SystemCVEAllowlistApiService service

func (*SystemCVEAllowlistApiService) GetSystemCVEAllowlist

func (*SystemCVEAllowlistApiService) PutSystemCVEAllowlist

func (a *SystemCVEAllowlistApiService) PutSystemCVEAllowlist(localVarOptionals *SystemCVEAllowlistApiPutSystemCVEAllowlistOpts) (*http.Response, error)

type SystemInfo

type SystemInfo struct {
	// The storage of system.
	Storage []Storage `json:"storage,omitempty"`
}

type SysteminfoApiGetCertOpts

type SysteminfoApiGetCertOpts struct {
	XRequestId optional.String
}

type SysteminfoApiGetSystemInfoOpts

type SysteminfoApiGetSystemInfoOpts struct {
	XRequestId optional.String
}

type SysteminfoApiGetVolumesOpts

type SysteminfoApiGetVolumesOpts struct {
	XRequestId optional.String
}

type SysteminfoApiService

type SysteminfoApiService service

func (*SysteminfoApiService) GetCert

func (a *SysteminfoApiService) GetCert(localVarOptionals *SysteminfoApiGetCertOpts) (*os.File, *http.Response, error)

func (*SysteminfoApiService) GetSystemInfo

func (a *SysteminfoApiService) GetSystemInfo(localVarOptionals *SysteminfoApiGetSystemInfoOpts) (GeneralInfo, *http.Response, error)

func (*SysteminfoApiService) GetVolumes

func (a *SysteminfoApiService) GetVolumes(localVarOptionals *SysteminfoApiGetVolumesOpts) (SystemInfo, *http.Response, error)

type Tag

type Tag struct {
	// The ID of the tag
	Id int64 `json:"id,omitempty"`
	// The ID of the repository that the tag belongs to
	RepositoryId int64 `json:"repository_id,omitempty"`
	// The ID of the artifact that the tag attached to
	ArtifactId int64 `json:"artifact_id,omitempty"`
	// The name of the tag
	Name string `json:"name,omitempty"`
	// The push time of the tag
	PushTime time.Time `json:"push_time,omitempty"`
	// The latest pull time of the tag
	PullTime time.Time `json:"pull_time,omitempty"`
	// The immutable status of the tag
	Immutable bool `json:"immutable,omitempty"`
	// The attribute indicates whether the tag is signed or not
	Signed bool `json:"signed,omitempty"`
}

type Task

type Task struct {
	// The ID of task
	Id int32 `json:"id,omitempty"`
	// The ID of task execution
	ExecutionId int32 `json:"execution_id,omitempty"`
	// The status of task
	Status string `json:"status,omitempty"`
	// The status message of task
	StatusMessage string `json:"status_message,omitempty"`
	// The count of task run
	RunCount   int32       `json:"run_count,omitempty"`
	ExtraAttrs *ExtraAttrs `json:"extra_attrs,omitempty"`
	// The creation time of task
	CreationTime string `json:"creation_time,omitempty"`
	// The update time of task
	UpdateTime string `json:"update_time,omitempty"`
	// The start time of task
	StartTime string `json:"start_time,omitempty"`
	// The end time of task
	EndTime string `json:"end_time,omitempty"`
}

type UserApiCreateUserOpts

type UserApiCreateUserOpts struct {
	XRequestId optional.String
}

type UserApiDeleteUserOpts

type UserApiDeleteUserOpts struct {
	XRequestId optional.String
}

type UserApiGetCurrentUserInfoOpts

type UserApiGetCurrentUserInfoOpts struct {
	XRequestId optional.String
}

type UserApiGetCurrentUserPermissionsOpts

type UserApiGetCurrentUserPermissionsOpts struct {
	XRequestId optional.String
	Scope      optional.String
	Relative   optional.Bool
}

type UserApiGetUserOpts

type UserApiGetUserOpts struct {
	XRequestId optional.String
}

type UserApiListUsersOpts

type UserApiListUsersOpts struct {
	XRequestId optional.String
	Q          optional.String
	Sort       optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type UserApiSearchUsersOpts

type UserApiSearchUsersOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type UserApiService

type UserApiService service

func (*UserApiService) CreateUser

func (a *UserApiService) CreateUser(userReq UserCreationReq, localVarOptionals *UserApiCreateUserOpts) (*http.Response, error)

func (*UserApiService) DeleteUser

func (a *UserApiService) DeleteUser(userId int32, localVarOptionals *UserApiDeleteUserOpts) (*http.Response, error)

func (*UserApiService) GetCurrentUserInfo

func (a *UserApiService) GetCurrentUserInfo(localVarOptionals *UserApiGetCurrentUserInfoOpts) (UserResp, *http.Response, error)

func (*UserApiService) GetCurrentUserPermissions

func (a *UserApiService) GetCurrentUserPermissions(localVarOptionals *UserApiGetCurrentUserPermissionsOpts) ([]Permission, *http.Response, error)

func (*UserApiService) GetUser

func (a *UserApiService) GetUser(userId int32, localVarOptionals *UserApiGetUserOpts) (UserResp, *http.Response, error)

func (*UserApiService) ListUsers

func (a *UserApiService) ListUsers(localVarOptionals *UserApiListUsersOpts) ([]UserResp, *http.Response, error)

func (*UserApiService) SearchUsers

func (a *UserApiService) SearchUsers(username string, localVarOptionals *UserApiSearchUsersOpts) ([]UserSearchRespItem, *http.Response, error)

func (*UserApiService) SetCliSecret

func (a *UserApiService) SetCliSecret(userId int32, secret OidcCliSecretReq, localVarOptionals *UserApiSetCliSecretOpts) (*http.Response, error)

func (*UserApiService) SetUserSysAdmin

func (a *UserApiService) SetUserSysAdmin(userId int32, sysadminFlag UserSysAdminFlag, localVarOptionals *UserApiSetUserSysAdminOpts) (*http.Response, error)

func (*UserApiService) UpdateUserPassword

func (a *UserApiService) UpdateUserPassword(userId int32, password PasswordReq, localVarOptionals *UserApiUpdateUserPasswordOpts) (*http.Response, error)

func (*UserApiService) UpdateUserProfile

func (a *UserApiService) UpdateUserProfile(userId int32, profile UserProfile, localVarOptionals *UserApiUpdateUserProfileOpts) (*http.Response, error)

type UserApiSetCliSecretOpts

type UserApiSetCliSecretOpts struct {
	XRequestId optional.String
}

type UserApiSetUserSysAdminOpts

type UserApiSetUserSysAdminOpts struct {
	XRequestId optional.String
}

type UserApiUpdateUserPasswordOpts

type UserApiUpdateUserPasswordOpts struct {
	XRequestId optional.String
}

type UserApiUpdateUserProfileOpts

type UserApiUpdateUserProfileOpts struct {
	XRequestId optional.String
}

type UserCreationReq

type UserCreationReq struct {
	Email    string `json:"email,omitempty"`
	Realname string `json:"realname,omitempty"`
	Comment  string `json:"comment,omitempty"`
	Password string `json:"password,omitempty"`
	Username string `json:"username,omitempty"`
}

type UserEntity

type UserEntity struct {
	// The ID of the user.
	UserId int32 `json:"user_id,omitempty"`
	// The name of the user.
	Username string `json:"username,omitempty"`
}

type UserGroup

type UserGroup struct {
	// The ID of the user group
	Id int32 `json:"id,omitempty"`
	// The name of the user group
	GroupName string `json:"group_name,omitempty"`
	// The group type, 1 for LDAP group, 2 for HTTP group.
	GroupType int32 `json:"group_type,omitempty"`
	// The DN of the LDAP group if group type is 1 (LDAP group).
	LdapGroupDn string `json:"ldap_group_dn,omitempty"`
}

type UserGroupSearchItem

type UserGroupSearchItem struct {
	// The ID of the user group
	Id int32 `json:"id,omitempty"`
	// The name of the user group
	GroupName string `json:"group_name,omitempty"`
	// The group type, 1 for LDAP group, 2 for HTTP group.
	GroupType int32 `json:"group_type,omitempty"`
}

type UserProfile

type UserProfile struct {
	Email    string `json:"email,omitempty"`
	Realname string `json:"realname,omitempty"`
	Comment  string `json:"comment,omitempty"`
}

type UserResp

type UserResp struct {
	Email        string `json:"email,omitempty"`
	Realname     string `json:"realname,omitempty"`
	Comment      string `json:"comment,omitempty"`
	UserId       int32  `json:"user_id,omitempty"`
	Username     string `json:"username,omitempty"`
	SysadminFlag bool   `json:"sysadmin_flag,omitempty"`
	// indicate the admin privilege is grant by authenticator (LDAP), is always false unless it is the current login user
	AdminRoleInAuth bool          `json:"admin_role_in_auth,omitempty"`
	OidcUserMeta    *OidcUserInfo `json:"oidc_user_meta,omitempty"`
	// The creation time of the user.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the user.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type UserSearch

type UserSearch struct {
	// The ID of the user.
	UserId   int32  `json:"user_id,omitempty"`
	Username string `json:"username,omitempty"`
}

type UserSearchRespItem

type UserSearchRespItem struct {
	// The ID of the user.
	UserId   int32  `json:"user_id,omitempty"`
	Username string `json:"username,omitempty"`
}

type UserSysAdminFlag

type UserSysAdminFlag struct {
	// true-admin, false-not admin.
	SysadminFlag bool `json:"sysadmin_flag,omitempty"`
}

type UsergroupApiCreateUserGroupOpts

type UsergroupApiCreateUserGroupOpts struct {
	XRequestId optional.String
	Usergroup  optional.Interface
}

type UsergroupApiDeleteUserGroupOpts

type UsergroupApiDeleteUserGroupOpts struct {
	XRequestId optional.String
}

type UsergroupApiGetUserGroupOpts

type UsergroupApiGetUserGroupOpts struct {
	XRequestId optional.String
}

type UsergroupApiListUserGroupsOpts

type UsergroupApiListUserGroupsOpts struct {
	XRequestId  optional.String
	Page        optional.Int64
	PageSize    optional.Int64
	LdapGroupDn optional.String
}

type UsergroupApiSearchUserGroupsOpts

type UsergroupApiSearchUserGroupsOpts struct {
	XRequestId optional.String
	Page       optional.Int64
	PageSize   optional.Int64
}

type UsergroupApiService

type UsergroupApiService service

func (*UsergroupApiService) CreateUserGroup

func (a *UsergroupApiService) CreateUserGroup(localVarOptionals *UsergroupApiCreateUserGroupOpts) (*http.Response, error)

func (*UsergroupApiService) DeleteUserGroup

func (a *UsergroupApiService) DeleteUserGroup(groupId int32, localVarOptionals *UsergroupApiDeleteUserGroupOpts) (*http.Response, error)

func (*UsergroupApiService) GetUserGroup

func (a *UsergroupApiService) GetUserGroup(groupId int64, localVarOptionals *UsergroupApiGetUserGroupOpts) (UserGroup, *http.Response, error)

func (*UsergroupApiService) ListUserGroups

func (a *UsergroupApiService) ListUserGroups(localVarOptionals *UsergroupApiListUserGroupsOpts) ([]UserGroup, *http.Response, error)

func (*UsergroupApiService) SearchUserGroups

func (a *UsergroupApiService) SearchUserGroups(groupname string, localVarOptionals *UsergroupApiSearchUserGroupsOpts) ([]UserGroupSearchItem, *http.Response, error)

func (*UsergroupApiService) UpdateUserGroup

func (a *UsergroupApiService) UpdateUserGroup(groupId int64, localVarOptionals *UsergroupApiUpdateUserGroupOpts) (*http.Response, error)

type UsergroupApiUpdateUserGroupOpts

type UsergroupApiUpdateUserGroupOpts struct {
	XRequestId optional.String
	Usergroup  optional.Interface
}

type VulnerabilitySummary

type VulnerabilitySummary struct {
	// The total number of the found vulnerabilities
	Total int32 `json:"total,omitempty"`
	// The number of the fixable vulnerabilities
	Fixable int32 `json:"fixable,omitempty"`
	// Numbers of the vulnerabilities with different severity
	Summary map[string]int32 `json:"summary,omitempty"`
}

VulnerabilitySummary contains the total number of the foun d vulnerabilities number and numbers of each severity level.

type WebhookApiCreateWebhookPolicyOfProjectOpts

type WebhookApiCreateWebhookPolicyOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookApiDeleteWebhookPolicyOfProjectOpts

type WebhookApiDeleteWebhookPolicyOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookApiGetSupportedEventTypesOpts

type WebhookApiGetSupportedEventTypesOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookApiGetWebhookPolicyOfProjectOpts

type WebhookApiGetWebhookPolicyOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookApiLastTriggerOpts

type WebhookApiLastTriggerOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookApiListWebhookPoliciesOfProjectOpts

type WebhookApiListWebhookPoliciesOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Sort            optional.String
	Q               optional.String
	Page            optional.Int64
	PageSize        optional.Int64
}

type WebhookApiService

type WebhookApiService service

func (*WebhookApiService) CreateWebhookPolicyOfProject

func (a *WebhookApiService) CreateWebhookPolicyOfProject(projectNameOrId string, policy WebhookPolicy, localVarOptionals *WebhookApiCreateWebhookPolicyOfProjectOpts) (*http.Response, error)

func (*WebhookApiService) DeleteWebhookPolicyOfProject

func (a *WebhookApiService) DeleteWebhookPolicyOfProject(projectNameOrId string, webhookPolicyId int64, localVarOptionals *WebhookApiDeleteWebhookPolicyOfProjectOpts) (*http.Response, error)

func (*WebhookApiService) GetSupportedEventTypes

func (a *WebhookApiService) GetSupportedEventTypes(projectNameOrId string, localVarOptionals *WebhookApiGetSupportedEventTypesOpts) (SupportedWebhookEventTypes, *http.Response, error)

func (*WebhookApiService) GetWebhookPolicyOfProject

func (a *WebhookApiService) GetWebhookPolicyOfProject(projectNameOrId string, webhookPolicyId int64, localVarOptionals *WebhookApiGetWebhookPolicyOfProjectOpts) (WebhookPolicy, *http.Response, error)

func (*WebhookApiService) LastTrigger

func (a *WebhookApiService) LastTrigger(projectNameOrId string, localVarOptionals *WebhookApiLastTriggerOpts) ([]WebhookLastTrigger, *http.Response, error)

func (*WebhookApiService) ListWebhookPoliciesOfProject

func (a *WebhookApiService) ListWebhookPoliciesOfProject(projectNameOrId string, localVarOptionals *WebhookApiListWebhookPoliciesOfProjectOpts) ([]WebhookPolicy, *http.Response, error)

func (*WebhookApiService) UpdateWebhookPolicyOfProject

func (a *WebhookApiService) UpdateWebhookPolicyOfProject(projectNameOrId string, webhookPolicyId int64, policy WebhookPolicy, localVarOptionals *WebhookApiUpdateWebhookPolicyOfProjectOpts) (*http.Response, error)

type WebhookApiUpdateWebhookPolicyOfProjectOpts

type WebhookApiUpdateWebhookPolicyOfProjectOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
}

type WebhookJob

type WebhookJob struct {
	// The webhook job ID.
	Id int64 `json:"id,omitempty"`
	// The webhook policy ID.
	PolicyId int64 `json:"policy_id,omitempty"`
	// The webhook job event type.
	EventType string `json:"event_type,omitempty"`
	// The webhook job notify type.
	NotifyType string `json:"notify_type,omitempty"`
	// The webhook job status.
	Status string `json:"status,omitempty"`
	// The webhook job notify detailed data.
	JobDetail string `json:"job_detail,omitempty"`
	// The webhook job creation time.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The webhook job update time.
	UpdateTime time.Time `json:"update_time,omitempty"`
}

The webhook job.

type WebhookLastTrigger

type WebhookLastTrigger struct {
	// The webhook policy name.
	PolicyName string `json:"policy_name,omitempty"`
	// The webhook event type.
	EventType string `json:"event_type,omitempty"`
	// Whether or not the webhook policy enabled.
	Enabled bool `json:"enabled,omitempty"`
	// The creation time of webhook policy.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The last trigger time of webhook policy.
	LastTriggerTime time.Time `json:"last_trigger_time,omitempty"`
}

The webhook policy and last trigger time group by event type.

type WebhookPolicy

type WebhookPolicy struct {
	// The webhook policy ID.
	Id int64 `json:"id,omitempty"`
	// The name of webhook policy.
	Name string `json:"name,omitempty"`
	// The description of webhook policy.
	Description string `json:"description,omitempty"`
	// The project ID of webhook policy.
	ProjectId  int32                 `json:"project_id,omitempty"`
	Targets    []WebhookTargetObject `json:"targets,omitempty"`
	EventTypes []string              `json:"event_types,omitempty"`
	// The creator of the webhook policy.
	Creator string `json:"creator,omitempty"`
	// The create time of the webhook policy.
	CreationTime time.Time `json:"creation_time,omitempty"`
	// The update time of the webhook policy.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Whether the webhook policy is enabled or not.
	Enabled bool `json:"enabled,omitempty"`
}

The webhook policy object

type WebhookTargetObject

type WebhookTargetObject struct {
	// The webhook target notify type.
	Type_ string `json:"type,omitempty"`
	// The webhook target address.
	Address string `json:"address,omitempty"`
	// The webhook auth header.
	AuthHeader string `json:"auth_header,omitempty"`
	// Whether or not to skip cert verify.
	SkipCertVerify bool `json:"skip_cert_verify,omitempty"`
}

The webhook policy target object.

type WebhookjobApiListWebhookJobsOpts

type WebhookjobApiListWebhookJobsOpts struct {
	XRequestId      optional.String
	XIsResourceName optional.Bool
	Q               optional.String
	Sort            optional.String
	Page            optional.Int64
	PageSize        optional.Int64
	Status          optional.Interface
}

type WebhookjobApiService

type WebhookjobApiService service

func (*WebhookjobApiService) ListWebhookJobs

func (a *WebhookjobApiService) ListWebhookJobs(projectNameOrId string, policyId int64, localVarOptionals *WebhookjobApiListWebhookJobsOpts) ([]WebhookJob, *http.Response, error)

Source Files

Jump to

Keyboard shortcuts

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