Documentation ¶
Overview ¶
Package userservice defines the User Service services of BCE. The supported APIs are all defined in sub-package
Index ¶
- Constants
- type AuthStatus
- type Client
- func (c *Client) CreateUserService(args *CreateUserServiceArgs) (*CreateUserServiceResult, error)
- func (c *Client) DeleteUserService(service string) error
- func (c *Client) DescribeUserServiceDetail(service string) (*DescribeUserServiceDetailResult, error)
- func (c *Client) DescribeUserServices(args *DescribeUserServicesArgs) (*DescribeUserServicesResult, error)
- func (c *Client) UpdateUserService(service string, args *UpdateServiceArgs) error
- func (c *Client) UserServiceAddAuth(service string, args *UserServiceAuthArgs) error
- func (c *Client) UserServiceBindInstance(service string, args *UserServiceBindArgs) error
- func (c *Client) UserServiceEditAuth(service string, args *UserServiceAuthArgs) error
- func (c *Client) UserServiceRemoveAuth(service string, args *UserServiceRemoveAuthArgs) error
- func (c *Client) UserServiceUnBindInstance(service string, args *UserServiceUnBindArgs) error
- type CreateUserServiceArgs
- type CreateUserServiceResult
- type DescribeUserServiceDetailResult
- type DescribeUserServicesArgs
- type DescribeUserServicesResult
- type RelatedEndpointModel
- type UpdateServiceArgs
- type UserServiceAuthArgs
- type UserServiceAuthModel
- type UserServiceBindArgs
- type UserServiceModel
- type UserServiceRemoveAuthArgs
- type UserServiceUnBindArgs
Constants ¶
const ( DEFAULT_SERVICE_DOMAIN = "blb." + bce.DEFAULT_REGION + ".baidubce.com" URI_PREFIX = bce.URI_PREFIX + "v1" REQUEST_SERVICE_URL = "/service" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStatus ¶
type AuthStatus string
const ( ServiceAuthAllow AuthStatus = "allow" ServiceAuthDeny AuthStatus = "deny" )
type Client ¶
func (*Client) CreateUserService ¶
func (c *Client) CreateUserService(args *CreateUserServiceArgs) (*CreateUserServiceResult, error)
CreateUserService - create a User Service
PARAMS:
- args: parameters to create User Service
RETURNS:
- *CreateUserServiceResult: the result of create User Service, contains new Service Domain
- error: nil if ok otherwise the specific error
func (*Client) DeleteUserService ¶
DeleteUserService - delete a User Service
PARAMS:
- blbId: parameters to delete Service Domain
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DescribeUserServiceDetail ¶
func (c *Client) DescribeUserServiceDetail(service string) (*DescribeUserServiceDetailResult, error)
DescribeUserServiceDetail - describe a User Service
PARAMS:
- service: describe Service Domain
RETURNS:
- *DescribeServiceDetailResult: the result Service detail
- error: nil if ok otherwise the specific error
func (*Client) DescribeUserServices ¶
func (c *Client) DescribeUserServices(args *DescribeUserServicesArgs) (*DescribeUserServicesResult, error)
DescribeUserServices - describe all User Services
PARAMS:
- args: parameters to describe all User Services
RETURNS:
- *DescribeUserServicesResult: the result all User Services's detail
- error: nil if ok otherwise the specific error
func (*Client) UpdateUserService ¶
func (c *Client) UpdateUserService(service string, args *UpdateServiceArgs) error
UpdateUserService - update a User Service
PARAMS:
- service: Service Domain
- args: parameters to update User Service
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) UserServiceAddAuth ¶
func (c *Client) UserServiceAddAuth(service string, args *UserServiceAuthArgs) error
UserServiceAddAuth - add auth to User Service
PARAMS:
- service: Service Domain
- args: parameters to add auth
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) UserServiceBindInstance ¶
func (c *Client) UserServiceBindInstance(service string, args *UserServiceBindArgs) error
UserServiceBindInstance - User Service bind BLB instance
PARAMS:
- service: Service Domain
- args: parameters to bind blb instance id
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) UserServiceEditAuth ¶
func (c *Client) UserServiceEditAuth(service string, args *UserServiceAuthArgs) error
UserServiceEditAuth - edit auth to User Service
PARAMS:
- service: Service Domain
- args: parameters to edit auth
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) UserServiceRemoveAuth ¶
func (c *Client) UserServiceRemoveAuth(service string, args *UserServiceRemoveAuthArgs) error
UserServiceRemoveAuth - Remove Auth to User Service
PARAMS:
- service: Service Domain
- args: parameters to remove auth
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) UserServiceUnBindInstance ¶
func (c *Client) UserServiceUnBindInstance(service string, args *UserServiceUnBindArgs) error
UserServiceUnBindInstance - User Service unbind BLB instance
PARAMS:
- service: Service Domain
- args: parameters to unbind blb instance id
RETURNS:
- error: nil if ok otherwise the specific error
type CreateUserServiceArgs ¶
type CreateUserServiceResult ¶
type CreateUserServiceResult struct {
Service string `json:"service"`
}
type DescribeUserServiceDetailResult ¶
type DescribeUserServiceDetailResult struct {
UserServiceModel
}
type DescribeUserServicesResult ¶
type DescribeUserServicesResult struct { Services []UserServiceModel `json:"services"` Marker string `json:"marker"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` MaxKeys int `json:"maxKeys"` }
type RelatedEndpointModel ¶
type UpdateServiceArgs ¶
type UserServiceAuthArgs ¶
type UserServiceAuthArgs struct { ClientToken string `json:"-"` AuthList []UserServiceAuthModel `json:"authList"` }
type UserServiceAuthModel ¶
type UserServiceAuthModel struct { Uid string `json:"uid"` Auth AuthStatus `json:"auth"` }
type UserServiceBindArgs ¶
type UserServiceModel ¶
type UserServiceModel struct { ServiceId string `json:"serviceId"` Name string `json:"name"` Description string `json:"description"` ServiceName string `json:"serviceName"` BindType string `json:"bindType"` InstanceId string `json:"instanceId"` Status string `json:"status"` Service string `json:"service"` CreateTime string `json:"createTime"` EndpointCount int `json:"endpointCount"` EndpointList []RelatedEndpointModel `json:"endpointList"` AuthList []UserServiceAuthModel `json:"authList"` }
type UserServiceUnBindArgs ¶
type UserServiceUnBindArgs struct {
ClientToken string `json:"-"`
}