userservice

package
v0.9.201 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package userservice defines the User Service services of BCE. The supported APIs are all defined in sub-package

Index

Constants

View Source
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

type Client struct {
	*bce.BceClient
}

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

NewClient 是一个函数,用于创建一个新的客户端对象

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

func (c *Client) DeleteUserService(service string) error

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 CreateUserServiceArgs struct {
	ClientToken string                 `json:"-"`
	InstanceId  string                 `json:"instanceId"`
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	ServiceName string                 `json:"serviceName"`
	AuthList    []UserServiceAuthModel `json:"authList"`
}

type CreateUserServiceResult

type CreateUserServiceResult struct {
	Service string `json:"service"`
}

type DescribeUserServiceDetailResult

type DescribeUserServiceDetailResult struct {
	UserServiceModel
}

type DescribeUserServicesArgs

type DescribeUserServicesArgs struct {
	Marker  string `json:"marker"`
	MaxKeys int    `json:"maxKeys"`
}

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 RelatedEndpointModel struct {
	EndpointId string `json:"endpointId"`
	Uid        string `json:"uid"`
	AttachTime string `json:"attachTime"`
}

type UpdateServiceArgs

type UpdateServiceArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

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 UserServiceBindArgs struct {
	ClientToken string `json:"-"`
	InstanceId  string `json:"instanceId"`
}

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 UserServiceRemoveAuthArgs

type UserServiceRemoveAuthArgs struct {
	ClientToken string   `json:"-"`
	UidList     []string `json:"uidList"`
}

type UserServiceUnBindArgs

type UserServiceUnBindArgs struct {
	ClientToken string `json:"-"`
}

Jump to

Keyboard shortcuts

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