bridge

package
v2.31.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectSwitchRequest

type ConnectSwitchRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`

	SwitchID types.ID `validate:"required"`
}

func (*ConnectSwitchRequest) Validate

func (req *ConnectSwitchRequest) Validate() error

type CreateRequest

type CreateRequest struct {
	Zone string `request:"-" validate:"required"`

	Name        string `validate:"required"`
	Description string `validate:"min=0,max=512"`
}

func (*CreateRequest) ToRequestParameter

func (req *CreateRequest) ToRequestParameter() (*sacloud.BridgeCreateRequest, error)

func (*CreateRequest) Validate

func (req *CreateRequest) Validate() error

type DeleteRequest

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

	FailIfNotFound bool `request:"-"`

	WaitForRelease        bool     `request:"-"` // trueの場合、他リソースから参照されている間は削除を待ち合わせし続ける
	WaitForReleaseTimeout int      // WaitForReleaseがtrueの場合の待ち時間タイムアウト(デフォルト:1時間)
	WaitForReleaseTick    int      // WaitForReleaseがtrueの場合の待ち処理のポーリング間隔(デフォルト:5秒)
	Zones                 []string // WaitForReleaseがtrueの場合の待ち処理で対象リソースを検索するゾーンのリスト、デフォルトはsacloud.SakuraCloudZones
}

func (*DeleteRequest) Validate

func (req *DeleteRequest) Validate() error

type DisconnectSwitchRequest

type DisconnectSwitchRequest struct {
	Zone string   `request:"-" validate:"required"`
	ID   types.ID `request:"-" validate:"required"`
}

func (*DisconnectSwitchRequest) Validate

func (req *DisconnectSwitchRequest) Validate() error

type FindRequest

type FindRequest struct {
	Zone string `request:"-" validate:"required"`

	Names []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 {
	Zone string   `request:"-" validate:"required"`
	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 Bridge

func New

func New(caller sacloud.APICaller) *Service

New returns new service instance of Bridge

func (*Service) ConnectSwitch

func (s *Service) ConnectSwitch(req *ConnectSwitchRequest) error

func (*Service) ConnectSwitchWithContext

func (s *Service) ConnectSwitchWithContext(ctx context.Context, req *ConnectSwitchRequest) error

func (*Service) Create

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

func (*Service) CreateWithContext

func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.Bridge, 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) DisconnectSwitch

func (s *Service) DisconnectSwitch(req *DisconnectSwitchRequest) error

func (*Service) DisconnectSwitchWithContext

func (s *Service) DisconnectSwitchWithContext(ctx context.Context, req *DisconnectSwitchRequest) error

func (*Service) Find

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

func (*Service) FindWithContext

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

func (*Service) Read

func (s *Service) Read(req *ReadRequest) (*sacloud.Bridge, error)

func (*Service) ReadWithContext

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

func (*Service) Update

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

func (*Service) UpdateWithContext

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

type UpdateRequest

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

	Name        *string `request:",omitempty" validate:"omitempty,min=1"`
	Description *string `request:",omitempty" validate:"omitempty,min=1,max=512"`
}

func (*UpdateRequest) ToRequestParameter

func (req *UpdateRequest) ToRequestParameter(current *sacloud.Bridge) (*sacloud.BridgeUpdateRequest, error)

func (*UpdateRequest) Validate

func (req *UpdateRequest) Validate() error

Jump to

Keyboard shortcuts

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