Documentation ¶
Overview ¶
Package bie defines the bie services of BCE. The supported APIs are all defined in sub-package
Index ¶
- Constants
- type Client
- func (c *Client) ClearVolFile(name string) error
- func (c *Client) CreateGroup(cgr *api.CreateGroupReq) (*api.CreateGroupResult, error)
- func (c *Client) CreateImageUser(cir *api.CreateImageReq) (*api.Image, error)
- func (c *Client) CreateService(cv *api.CoreidVersion, sr *api.CreateServiceReq) (*api.ServiceResult, error)
- func (c *Client) CreateVolFile(name string, cvf *api.CreateVolFileReq) (*api.CreateVolFileReq, error)
- func (c *Client) CreateVolume(cvr *api.CreateVolReq) (*api.VolumeResult, error)
- func (c *Client) DeleteGroup(groupUuid string) error
- func (c *Client) DeleteImageUser(uuid string) error
- func (c *Client) DeleteService(ivn *api.IdVerName) error
- func (c *Client) DeleteVolFile(name string, filename string) error
- func (c *Client) DeleteVolume(name string) error
- func (c *Client) DeployConfig(coreid string, ver string) error
- func (c *Client) DownloadConfig(cdr *api.CfgDownloadReq) (*api.CfgDownloadResult, error)
- func (c *Client) DownloadVolVer(name string, version string) (*api.VolDownloadResult, error)
- func (c *Client) EditCoreVolVer(name string, ecvr *api.EditCoreVolVerReq) error
- func (c *Client) EditGroup(groupid string, egr *api.EditGroupReq) (*api.Group, error)
- func (c *Client) EditImageUser(uuid string, eir *api.EditImageReq) (*api.Image, error)
- func (c *Client) EditService(ivn *api.IdVerName, esr *api.EditServiceReq) (*api.ServiceResult, error)
- func (c *Client) EditVolume(name string, evr *api.EditVolumeReq) (*api.VolumeResult, error)
- func (c *Client) EditVolumeFile(names *api.Name2, body *api.EditVolFileReq) (*api.CreateVolFileReq, error)
- func (c *Client) GetConfig(coreid string, ver string) (*api.CfgResult, error)
- func (c *Client) GetCore(groupUuid string, coreid string) (*api.CoreResult, error)
- func (c *Client) GetCoreStatus(coreid string) (*api.CoreStatus, error)
- func (c *Client) GetGroup(groupUuid string) (*api.Group, error)
- func (c *Client) GetImageSys(uuid string) (*api.Image, error)
- func (c *Client) GetImageUser(uuid string) (*api.Image, error)
- func (c *Client) GetService(ivn *api.IdVerName) (*api.ServiceResult, error)
- func (c *Client) GetVolume(name string) (*api.VolumeResult, error)
- func (c *Client) GetVolumeFile(cvfr *api.GetVolFileReq) (*api.CreateVolFileReq, error)
- func (c *Client) ImportBos(name string, ibr *api.ImportBosReq) error
- func (c *Client) ImportCfc(name string, icr *api.ImportCfcReq) error
- func (c *Client) ListConfig(coreid string, lcr *api.ListConfigReq) (*api.ListConfigResult, error)
- func (c *Client) ListCore(groupUuid string) (*api.ListCoreResult, error)
- func (c *Client) ListGroup(lgr *api.ListGroupReq) (*api.ListGroupResult, error)
- func (c *Client) ListImageSys(lir *api.ListImageReq) (*api.ListImageResult, error)
- func (c *Client) ListImageUser(lir *api.ListImageReq) (*api.ListImageResult, error)
- func (c *Client) ListVolCore(lvcr *api.ListVolCoreReq) (*api.ListVolCoreResult, error)
- func (c *Client) ListVolume(lvr *api.ListVolumeReq) (*api.ListVolumeResult, error)
- func (c *Client) ListVolumeTpl() (*api.ListVolTemplate, error)
- func (c *Client) ListVolumeVer(nv *api.NameVersion) (*api.ListVolumeVerResult, error)
- func (c *Client) PubConfig(cpr *api.CoreidVersion, cpb *api.CfgPubBody) (*api.CfgResult, error)
- func (c *Client) PubVolumeVer(name string) (*api.VolumeResult, error)
- func (c *Client) RenewCoreAuth(coreid string) (*api.CoreInfo, error)
- func (c *Client) ReorderService(ivn *api.IdVerName, after string) error
- func (c *Client) VolumeOp(cv *api.CoreidVersion, vor *api.VolumeOpReq) error
Constants ¶
const (
DEFAULT_SERVICE_DOMAIN = "iotedge." + bce.DEFAULT_REGION + "." + bce.DEFAULT_DOMAIN
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client of BIE(iot edge) service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the BIE service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) ClearVolFile ¶
ClearVolFile - clear all volume files
PARAMS:
- name: the requested volume name
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(cgr *api.CreateGroupReq) (*api.CreateGroupResult, error)
CreateGroup - create a group
PARAMS:
- cgr: parameters to create group
RETURNS:
- *CreateGroupResult: the result group
- error: nil if ok otherwise the specific error
func (*Client) CreateImageUser ¶
CreateImageUser - create a user docker image
PARAMS:
- CreateImageReq: request parameters, name, image url, description
RETURNS:
- *Image: the result iamge
- error: nil if ok otherwise the specific error
func (*Client) CreateService ¶
func (c *Client) CreateService(cv *api.CoreidVersion, sr *api.CreateServiceReq) (*api.ServiceResult, error)
CreateService - create a service
PARAMS:
- *CoreidVersion: coreid, version
- *CreateServiceReq: request parameters
RETURNS:
- *ServiceResult: the result
- error: nil if ok otherwise the specific error
func (*Client) CreateVolFile ¶
func (c *Client) CreateVolFile(name string, cvf *api.CreateVolFileReq) (*api.CreateVolFileReq, error)
CreateVolFile - create a volume file
PARAMS:
- name: the request volume name
- *CreateVolFileReq: request parameters
RETURNS:
- *CreateVolFileReq: the result
- error: nil if ok otherwise the specific error
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(cvr *api.CreateVolReq) (*api.VolumeResult, error)
CreateVolume - create a volume
PARAMS:
- CreateVolReq: the request parameters
RETURNS:
- *VolumeResult: the result volume
- error: nil if ok otherwise the specific error
func (*Client) DeleteGroup ¶
DeleteGroup - delete a group of the account
PARAMS:
- groupUuid: id of the group
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DeleteImageUser ¶
DeleteImageUser - delete a user docker image
PARAMS:
- uuid: the image uuid
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DeleteService ¶
DeleteService - delete a service
PARAMS:
- *IdVerName: coreid, version, and name
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DeleteVolFile ¶
DeleteVolFile - delete a volume file
PARAMS:
- name: the requested volume name
- filename: the requested volume filename
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DeleteVolume ¶
DeleteVolume - delete a volume
PARAMS:
- name: the requested volume name
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DeployConfig ¶
DeployConfig - deploy a config
PARAMS:
- coreid: id of the core
- ver: version, e.g:$LATEST
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) DownloadConfig ¶
func (c *Client) DownloadConfig(cdr *api.CfgDownloadReq) (*api.CfgDownloadResult, error)
DownloadConfig - download a config
PARAMS:
- *CfgDownloadReq: id, version, with bin or not
RETURNS:
- *CfgDownloadResult: the result
- error: nil if ok otherwise the specific error
func (*Client) DownloadVolVer ¶
DownloadVolVer - get the download address of a specific version of volume
PARAMS:
- name: the request volume name
- version: the request volume version
RETURNS:
- *VolDownloadResult: the result
- error: nil if ok otherwise the specific error
func (*Client) EditCoreVolVer ¶
func (c *Client) EditCoreVolVer(name string, ecvr *api.EditCoreVolVerReq) error
EditCoreVolVer - edit the core version
PARAMS:
- name: the volume name
- *EditCoreVolVerReq: the request parameters
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) EditGroup ¶
EditGroup - edit a group
PARAMS:
- groupId: the group to edit
- egr: parameters to update group
RETURNS:
- *Group: the result group
- error: nil if ok otherwise the specific error
func (*Client) EditImageUser ¶
EditImageUser - edit a user docker image information
PARAMS:
- uuid: the image uuid
- EditImageReq: request parameter: description
RETURNS:
- *Image: the result iamge
- error: nil if ok otherwise the specific error
func (*Client) EditService ¶
func (c *Client) EditService(ivn *api.IdVerName, esr *api.EditServiceReq) (*api.ServiceResult, error)
EditService - edit a service
PARAMS:
- *IdVerName: coreid, version, and name
RETURNS:
- *ServiceResult: the result
- error: nil if ok otherwise the specific error
func (*Client) EditVolume ¶
func (c *Client) EditVolume(name string, evr *api.EditVolumeReq) (*api.VolumeResult, error)
EditVolume - edit a volume
PARAMS:
- name: the requested volume name
- *EditVolumeReq: request parameters
RETURNS:
- *VolumeResult: the result vaolume
- error: nil if ok otherwise the specific error
func (*Client) EditVolumeFile ¶
func (c *Client) EditVolumeFile(names *api.Name2, body *api.EditVolFileReq) (*api.CreateVolFileReq, error)
EditVolumeFile - edit a volume file
PARAMS:
- *Name2: the requested volume name and file name
- *EditVolFileReq: the content, the request body
RETURNS:
- *CreateVolFileReq: the result
- error: nil if ok otherwise the specific error
func (*Client) GetConfig ¶
GetConfig - get a config
PARAMS:
- coreid: id of the core
- ver: version, e.g:$LATEST
RETURNS:
- *CfgResult: the result config
- error: nil if ok otherwise the specific error
func (*Client) GetCore ¶
GetCore - get a core of a group
PARAMS:
- groupUuid: id of the group
- coreid: id of the core
RETURNS:
- *CoreResult: the result core
- error: nil if ok otherwise the specific error
func (*Client) GetCoreStatus ¶
func (c *Client) GetCoreStatus(coreid string) (*api.CoreStatus, error)
GetCoreStatus - get the status of a core
PARAMS:
- coreid: id of the core
RETURNS:
- *CoreStatus: the status of the core
- error: nil if ok otherwise the specific error
func (*Client) GetGroup ¶
GetGroup - get a group
RETURNS:
- *api.Group: the group
- error: the return error if any occurs
func (*Client) GetImageSys ¶
GetImageSys - get a system docker images
PARAMS:
- uuid: the image uuid
RETURNS:
- *Image: the result iamge
- error: nil if ok otherwise the specific error
func (*Client) GetImageUser ¶
GetImageUser - get a user docker image
PARAMS:
- uuid: the image uuid
RETURNS:
- *Image: the result iamge
- error: nil if ok otherwise the specific error
func (*Client) GetService ¶
GetService - get a service
PARAMS:
- *IdVerName: coreid, version and name
RETURNS:
- *ServiceResult: the result
- error: nil if ok otherwise the specific error
func (*Client) GetVolume ¶
func (c *Client) GetVolume(name string) (*api.VolumeResult, error)
GetVolume - get a volume
PARAMS:
- name: the requested volume name
RETURNS:
- *VolumeResult: the result vaolume
- error: nil if ok otherwise the specific error
func (*Client) GetVolumeFile ¶
func (c *Client) GetVolumeFile(cvfr *api.GetVolFileReq) (*api.CreateVolFileReq, error)
GetVolumeFile - get a volume file
PARAMS:
- GetVolFileReq: volume name, version anf filename
RETURNS:
- *ListVolumeVerResult: the result list
- error: nil if ok otherwise the specific error
func (*Client) ImportBos ¶
func (c *Client) ImportBos(name string, ibr *api.ImportBosReq) error
ImportBos - import a BOS file into volume
PARAMS:
- name: the volume name
- *ImportBosReq: the request parameters
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) ImportCfc ¶
func (c *Client) ImportCfc(name string, icr *api.ImportCfcReq) error
ImportCfc - import a CFC function into volume
PARAMS:
- name: the volume name
- *ImportCfcReq: the request parameters
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) ListConfig ¶
func (c *Client) ListConfig(coreid string, lcr *api.ListConfigReq) (*api.ListConfigResult, error)
ListConfig - list all configs
PARAMS:
- coreid: id of the core
RETURNS:
- *ListConfigResult: the result config list
- error: nil if ok otherwise the specific error
func (*Client) ListCore ¶
func (c *Client) ListCore(groupUuid string) (*api.ListCoreResult, error)
ListCore - list all core of a group
PARAMS:
- groupUuid: id of the group
RETURNS:
- *ListCoreResult: the result core list
- error: nil if ok otherwise the specific error
func (*Client) ListGroup ¶
func (c *Client) ListGroup(lgr *api.ListGroupReq) (*api.ListGroupResult, error)
ListGroup - list all groups
- *ListGroupReq: page no, page size, and name
RETURNS:
- *api.ListGroupResult: the all groups
- error: the return error if any occurs
func (*Client) ListImageSys ¶
func (c *Client) ListImageSys(lir *api.ListImageReq) (*api.ListImageResult, error)
//////////////////////////////////////////// Volume API //////////////////////////////////////////// ListImageSys - list all system docker images
PARAMS:
- ListImageReq: list request parameters
RETURNS:
- *ListImageResult: the result iamge list
- error: nil if ok otherwise the specific error
func (*Client) ListImageUser ¶
func (c *Client) ListImageUser(lir *api.ListImageReq) (*api.ListImageResult, error)
ListImageUser - list all user docker images
PARAMS:
- ListImageReq: list request parameters
RETURNS:
- *ListImageResult: the result iamge list
- error: nil if ok otherwise the specific error
func (*Client) ListVolCore ¶
func (c *Client) ListVolCore(lvcr *api.ListVolCoreReq) (*api.ListVolCoreResult, error)
ListVolCore - list the cores associated with the volume
PARAMS:
- *ListVolCoreReq: the request parameters
RETURNS:
- *ListVolumeVerResult: the result list
- error: nil if ok otherwise the specific error
func (*Client) ListVolume ¶
func (c *Client) ListVolume(lvr *api.ListVolumeReq) (*api.ListVolumeResult, error)
ListVolume - list a bunch of volumes
PARAMS:
- ListVolReq: the request parameters
RETURNS:
- *ListVolumeResult: the result list
- error: nil if ok otherwise the specific error
func (*Client) ListVolumeTpl ¶
func (c *Client) ListVolumeTpl() (*api.ListVolTemplate, error)
//////////////////////////////////////////// Volume API //////////////////////////////////////////// ListVolumeTpl - list all volume template
PARAMS: RETURNS:
- *ListVolTemplate: the result volume template list
- error: nil if ok otherwise the specific error
func (*Client) ListVolumeVer ¶
func (c *Client) ListVolumeVer(nv *api.NameVersion) (*api.ListVolumeVerResult, error)
ListVolumeVer - list version list of a volume
PARAMS:
- NameVersion: the request parameters, version can be empty
RETURNS:
- *ListVolumeVerResult: the result list
- error: nil if ok otherwise the specific error
func (*Client) PubConfig ¶
func (c *Client) PubConfig(cpr *api.CoreidVersion, cpb *api.CfgPubBody) (*api.CfgResult, error)
PubConfig - pub a config
PARAMS:
- cpr: id of the core and version
RETURNS:
- *CfgResult: the pub result
- error: nil if ok otherwise the specific error
func (*Client) PubVolumeVer ¶
func (c *Client) PubVolumeVer(name string) (*api.VolumeResult, error)
PubVolumeVer - pub version list of a volume
PARAMS:
- name: the request volume name
RETURNS:
- *VolumeResult: the result volume
- error: nil if ok otherwise the specific error
func (*Client) RenewCoreAuth ¶
RenewCoreAuth - renew the auth of a core
PARAMS:
- coreid: id of the core
RETURNS:
- *CoreInfo: the result core info
- error: nil if ok otherwise the specific error
func (*Client) ReorderService ¶
ReorderService - reorder service after an other service
PARAMS:
- *IdVerName: coreid, version, and name
RETURNS:
- error: nil if ok otherwise the specific error
func (*Client) VolumeOp ¶
func (c *Client) VolumeOp(cv *api.CoreidVersion, vor *api.VolumeOpReq) error
VolumeOp - attache of detach volumes
PARAMS:
- *CoreidVersion: coreid, version
- *VolumeOpReq: request parameters
RETURNS:
- error: nil if ok otherwise the specific error