Documentation ¶
Index ¶
- type ApplyRequest
- type Builder
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type HealthRequest
- type MonitorLocalRouterRequest
- type ReadRequest
- type Service
- func (s *Service) Apply(req *ApplyRequest) (*sacloud.LocalRouter, error)
- func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.LocalRouter, error)
- func (s *Service) Create(req *CreateRequest) (*sacloud.LocalRouter, error)
- func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.LocalRouter, error)
- func (s *Service) Delete(req *DeleteRequest) error
- func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error
- func (s *Service) Find(req *FindRequest) ([]*sacloud.LocalRouter, error)
- func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.LocalRouter, error)
- func (s *Service) Health(req *HealthRequest) (*sacloud.LocalRouterHealth, error)
- func (s *Service) HealthWithContext(ctx context.Context, req *HealthRequest) (*sacloud.LocalRouterHealth, error)
- func (s *Service) MonitorLocalRouter(req *MonitorLocalRouterRequest) ([]*sacloud.MonitorLocalRouterValue, error)
- func (s *Service) MonitorLocalRouterWithContext(ctx context.Context, req *MonitorLocalRouterRequest) ([]*sacloud.MonitorLocalRouterValue, error)
- func (s *Service) Read(req *ReadRequest) (*sacloud.LocalRouter, error)
- func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.LocalRouter, error)
- func (s *Service) Update(req *UpdateRequest) (*sacloud.LocalRouter, error)
- func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.LocalRouter, error)
- type UpdateRequest
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 Switch *sacloud.LocalRouterSwitch Interface *sacloud.LocalRouterInterface Peers []*sacloud.LocalRouterPeer StaticRoutes []*sacloud.LocalRouterStaticRoute SettingsHash string }
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 Switch *sacloud.LocalRouterSwitch Interface *sacloud.LocalRouterInterface Peers []*sacloud.LocalRouterPeer StaticRoutes []*sacloud.LocalRouterStaticRoute SettingsHash string Caller sacloud.APICaller }
Builder ローカルルータの構築を行う
func BuilderFromResource ¶
type CreateRequest ¶
type CreateRequest struct { Name string `validate:"required"` Description string `validate:"min=0,max=512"` Tags types.Tags IconID types.ID Switch *sacloud.LocalRouterSwitch `request:",omitempty" validate:"required_with=Interface"` Interface *sacloud.LocalRouterInterface `request:",omitempty" validate:"required_with=Switch"` Peers []*sacloud.LocalRouterPeer StaticRoutes []*sacloud.LocalRouterStaticRoute }
func (*CreateRequest) Builder ¶
func (req *CreateRequest) Builder(caller sacloud.APICaller) *Builder
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 HealthRequest ¶
func (*HealthRequest) Validate ¶
func (req *HealthRequest) Validate() error
type MonitorLocalRouterRequest ¶
type MonitorLocalRouterRequest struct { ID types.ID `request:"-" validate:"required"` Start time.Time End time.Time }
func (*MonitorLocalRouterRequest) Validate ¶
func (req *MonitorLocalRouterRequest) Validate() error
type ReadRequest ¶
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 LocalRouter
func (*Service) Apply ¶
func (s *Service) Apply(req *ApplyRequest) (*sacloud.LocalRouter, error)
func (*Service) ApplyWithContext ¶
func (s *Service) ApplyWithContext(ctx context.Context, req *ApplyRequest) (*sacloud.LocalRouter, error)
func (*Service) Create ¶
func (s *Service) Create(req *CreateRequest) (*sacloud.LocalRouter, error)
func (*Service) CreateWithContext ¶
func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*sacloud.LocalRouter, 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.LocalRouter, error)
func (*Service) FindWithContext ¶
func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*sacloud.LocalRouter, error)
func (*Service) Health ¶
func (s *Service) Health(req *HealthRequest) (*sacloud.LocalRouterHealth, error)
func (*Service) HealthWithContext ¶
func (s *Service) HealthWithContext(ctx context.Context, req *HealthRequest) (*sacloud.LocalRouterHealth, error)
func (*Service) MonitorLocalRouter ¶
func (s *Service) MonitorLocalRouter(req *MonitorLocalRouterRequest) ([]*sacloud.MonitorLocalRouterValue, error)
func (*Service) MonitorLocalRouterWithContext ¶
func (s *Service) MonitorLocalRouterWithContext(ctx context.Context, req *MonitorLocalRouterRequest) ([]*sacloud.MonitorLocalRouterValue, error)
func (*Service) Read ¶
func (s *Service) Read(req *ReadRequest) (*sacloud.LocalRouter, error)
func (*Service) ReadWithContext ¶
func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*sacloud.LocalRouter, error)
func (*Service) Update ¶
func (s *Service) Update(req *UpdateRequest) (*sacloud.LocalRouter, error)
func (*Service) UpdateWithContext ¶
func (s *Service) UpdateWithContext(ctx context.Context, req *UpdateRequest) (*sacloud.LocalRouter, 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"` Switch *sacloud.LocalRouterSwitch `request:",omitempty"` Interface *sacloud.LocalRouterInterface `request:",omitempty"` Peers *[]*sacloud.LocalRouterPeer `request:",omitempty"` StaticRoutes *[]*sacloud.LocalRouterStaticRoute `request:",omitempty"` SettingsHash string }
func (*UpdateRequest) Validate ¶
func (req *UpdateRequest) Validate() error
Source Files ¶
- apply_request.go
- apply_service.go
- builder.go
- create_request.go
- create_service.go
- delete_request.go
- delete_service.go
- find_request.go
- find_service.go
- health_request.go
- health_service.go
- monitor_local_router_request.go
- monitor_local_router_service.go
- read_request.go
- read_service.go
- service.go
- update_request.go
- update_service.go
Click to show internal directories.
Click to hide internal directories.