Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MountClusterController ¶
func MountClusterController(service *goa.Service, ctrl ClusterController)
MountClusterController "mounts" a Cluster resource controller on the given service.
Types ¶
type ClusterController ¶
type ClusterController interface { goa.Muxer CreateOrJoin(*CreateOrJoinClusterContext) error GetStatus(*GetStatusClusterContext) error Status(*StatusClusterContext) error }
ClusterController is the controller interface for the Cluster actions.
type Couchbasecluster ¶
type Couchbasecluster struct { // The cluster id ClusterID string `form:"cluster_id" json:"cluster_id" xml:"cluster_id"` // The initial node ip address or host that can be used to join cluster InitialNodeIPAddrOrHostname string `form:"initial_node_ip_addr_or_hostname" json:"initial_node_ip_addr_or_hostname" xml:"initial_node_ip_addr_or_hostname"` // Whether the node_ip_addr_or_hostname passed in the request represents the initial node in the cluster IsInitialNode bool `form:"is_initial_node" json:"is_initial_node" xml:"is_initial_node"` }
A CouchbaseCluster (default view)
Identifier: application/vnd.couchbasecluster+json; view=default
func (*Couchbasecluster) Validate ¶
func (mt *Couchbasecluster) Validate() (err error)
Validate validates the Couchbasecluster media type instance.
type CreateOrJoinClusterContext ¶
type CreateOrJoinClusterContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *CreateOrJoinClusterPayload }
CreateOrJoinClusterContext provides the cluster create_or_join action context.
func NewCreateOrJoinClusterContext ¶
func NewCreateOrJoinClusterContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateOrJoinClusterContext, error)
NewCreateOrJoinClusterContext parses the incoming request URL and body, performs validations and creates the context used by the cluster controller create_or_join action.
func (*CreateOrJoinClusterContext) OK ¶
func (ctx *CreateOrJoinClusterContext) OK(r *Couchbasecluster) error
OK sends a HTTP response with status code 200.
type CreateOrJoinClusterPayload ¶
type CreateOrJoinClusterPayload struct { ClusterID *string `form:"cluster_id,omitempty" json:"cluster_id,omitempty" xml:"cluster_id,omitempty"` NodeIPAddrOrHostname *string `form:"node_ip_addr_or_hostname,omitempty" json:"node_ip_addr_or_hostname,omitempty" xml:"node_ip_addr_or_hostname,omitempty"` }
CreateOrJoinClusterPayload user type.
func (*CreateOrJoinClusterPayload) Validate ¶
func (ut *CreateOrJoinClusterPayload) Validate() (err error)
Validate validates the CreateOrJoinClusterPayload type instance.
type GetStatusClusterContext ¶
type GetStatusClusterContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *GetStatusClusterPayload }
GetStatusClusterContext provides the cluster get_status action context.
func NewGetStatusClusterContext ¶
func NewGetStatusClusterContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetStatusClusterContext, error)
NewGetStatusClusterContext parses the incoming request URL and body, performs validations and creates the context used by the cluster controller get_status action.
func (*GetStatusClusterContext) OK ¶
func (ctx *GetStatusClusterContext) OK(r *Couchbasecluster) error
OK sends a HTTP response with status code 200.
type GetStatusClusterPayload ¶
type GetStatusClusterPayload struct { ClusterID string `form:"cluster_id" json:"cluster_id" xml:"cluster_id"` NodeIPAddrOrHostname *string `form:"node_ip_addr_or_hostname,omitempty" json:"node_ip_addr_or_hostname,omitempty" xml:"node_ip_addr_or_hostname,omitempty"` }
GetStatusClusterPayload is the cluster get_status action payload.
func (*GetStatusClusterPayload) Validate ¶
func (payload *GetStatusClusterPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type StatusClusterContext ¶
type StatusClusterContext struct { context.Context *goa.ResponseData *goa.RequestData ClusterID string }
StatusClusterContext provides the cluster status action context.
func NewStatusClusterContext ¶
func NewStatusClusterContext(ctx context.Context, r *http.Request, service *goa.Service) (*StatusClusterContext, error)
NewStatusClusterContext parses the incoming request URL and body, performs validations and creates the context used by the cluster controller status action.
func (*StatusClusterContext) OK ¶
func (ctx *StatusClusterContext) OK(r *Couchbasecluster) error
OK sends a HTTP response with status code 200.