containerregistry

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyRequest

type ApplyRequest struct {
	ID types.ID `request:"-"`

	Name           string `validate:"required"`
	Description    string `validate:"min=0,max=512"`
	Tags           types.Tags
	IconID         types.ID
	AccessLevel    types.EContainerRegistryAccessLevel
	VirtualDomain  string
	SubDomainLabel string
	Users          []*User

	SettingsHash string
}

func (*ApplyRequest) Builder

func (req *ApplyRequest) Builder(caller sacloud.APICaller) (*Builder, error)

func (*ApplyRequest) Validate

func (req *ApplyRequest) Validate() error

type Builder

type Builder struct {
	ID types.ID

	Name           string
	Description    string
	Tags           types.Tags
	IconID         types.ID
	AccessLevel    types.EContainerRegistryAccessLevel
	VirtualDomain  string
	SubDomainLabel string
	Users          []*User
	SettingsHash   string
	Client         sacloud.ContainerRegistryAPI
}

Builder コンテナレジストリのビルダー

func (*Builder) Build

type CreateRequest

type CreateRequest struct {
	Name           string `validate:"required"`
	Description    string `validate:"min=0,max=512"`
	Tags           types.Tags
	IconID         types.ID
	AccessLevel    types.EContainerRegistryAccessLevel
	VirtualDomain  string
	SubDomainLabel string
	Users          []*User
}

func (*CreateRequest) ApplyRequest added in v2.9.0

func (req *CreateRequest) ApplyRequest() *ApplyRequest

func (*CreateRequest) Validate

func (req *CreateRequest) Validate() error

type DeleteRequest

type DeleteRequest struct {
	ID types.ID `request:"-" validate:"required"`

	FailIfNotFound bool `request:"-"`
}

func (*DeleteRequest) Validate

func (req *DeleteRequest) Validate() error

type FindRequest

type FindRequest struct {
	Names []string `request:"-"`
	Tags  []string `request:"-"`

	Sort  search.SortKeys
	Count int
	From  int
}

func (*FindRequest) ToRequestParameter

func (req *FindRequest) ToRequestParameter() (*sacloud.FindCondition, error)

func (*FindRequest) Validate

func (req *FindRequest) Validate() error

type ReadRequest

type ReadRequest struct {
	ID types.ID `request:"-" validate:"required"`
}

func (*ReadRequest) Validate

func (req *ReadRequest) Validate() error

type Service

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

Service provides a high-level API of for ContainerRegistry

func New

func New(caller sacloud.APICaller) *Service

New returns new service instance of ContainerRegistry

func (*Service) Apply

func (s *Service) Apply(req *ApplyRequest) (*sacloud.ContainerRegistry, error)

func (*Service) ApplyWithContext

func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.ContainerRegistry, error)

func (*Service) Create

func (s *Service) Create(req *CreateRequest) (*sacloud.ContainerRegistry, error)

func (*Service) CreateWithContext

func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.ContainerRegistry, error)

func (*Service) Delete

func (s *Service) Delete(req *DeleteRequest) error

func (*Service) DeleteWithContext

func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error

func (*Service) Find

func (s *Service) Find(req *FindRequest) ([]*sacloud.ContainerRegistry, error)

func (*Service) FindWithContext

func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.ContainerRegistry, error)

func (*Service) Read

func (*Service) ReadWithContext

func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.ContainerRegistry, error)

func (*Service) Update

func (s *Service) Update(req *UpdateRequest) (*sacloud.ContainerRegistry, error)

func (*Service) UpdateWithContext

func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.ContainerRegistry, error)

type UpdateRequest

type UpdateRequest struct {
	ID types.ID `request:"-" validate:"required"`

	Name          *string                              `request:",omitempty" validate:"omitempty,min=1"`
	Description   *string                              `request:",omitempty" validate:"omitempty,min=1,max=512"`
	Tags          *types.Tags                          `request:",omitempty"`
	IconID        *types.ID                            `request:",omitempty"`
	AccessLevel   *types.EContainerRegistryAccessLevel `request:",omitempty"`
	VirtualDomain *string                              `request:",omitempty"`
	Users         *[]*User                             `request:",omitempty"`
	SettingsHash  string
}

func (*UpdateRequest) ApplyRequest added in v2.9.0

func (req *UpdateRequest) ApplyRequest(ctx context.Context, caller sacloud.APICaller) (*ApplyRequest, error)

func (*UpdateRequest) Validate

func (req *UpdateRequest) Validate() error

type User

type User struct {
	UserName   string
	Password   string
	Permission types.EContainerRegistryPermission
}

User represents API parameter/response structure

Jump to

Keyboard shortcuts

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