Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) DeleteDocument(documentId string) error
- func (c *Client) GetImages(documentId string) (*api.GetImagesResp, error)
- func (c *Client) ListDocuments(listParam *api.ListDocumentsParam) (*api.ListDocumentsResp, error)
- func (c *Client) PublishDocument(documentId string) error
- func (c *Client) QueryDocument(documentId string, queryParam *api.QueryDocumentParam) (*api.QueryDocumentResp, error)
- func (c *Client) ReadDocument(documentId string, readParam *api.ReadDocumentParam) (*api.ReadDocumentResp, error)
- func (c *Client) RegisterDocument(regParam *api.RegDocumentParam) (*api.RegDocumentResp, error)
- type DocClientConfiguration
Constants ¶
const (
DEFAULT_SERVICE_DOMAIN = "doc.bj.baidubce.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client of DOC service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the DOC service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func NewClientWithConfig ¶
func NewClientWithConfig(config *DocClientConfiguration) (*Client, error)
func (*Client) DeleteDocument ¶
DeleteDocument - delete document in doc service
PARAMS:
- documentId: id of document in doc service
RETURNS:
- error: the return error if any occurs
func (*Client) GetImages ¶
func (c *Client) GetImages(documentId string) (*api.GetImagesResp, error)
GetImages - Get the list of images generated by the document conversion
PARAMS:
- documentId: id of document in doc service
RETURNS:
- *api.ImagesListResp
- error: the return error if any occurs
func (*Client) ListDocuments ¶
func (c *Client) ListDocuments(listParam *api.ListDocumentsParam) (*api.ListDocumentsResp, error)
ListDocuments - list all documents
PARAMS:
- cli: the client agent which can perform sending request
- param: the optional arguments to list documents
RETURNS:
- *ListDocumentsResp: the result docments list structure
- error: nil if ok otherwise the specific error
func (*Client) PublishDocument ¶
PublishDocument - publish document
PARAMS:
- documentId: id of document in doc service
RETURNS:
- error: the return error if any occurs
func (*Client) QueryDocument ¶
func (c *Client) QueryDocument(documentId string, queryParam *api.QueryDocumentParam) (*api.QueryDocumentResp, error)
QueryDocument - query document's status
PARAMS:
- documentId: id of document in doc service
- queryParam: enable/disable https of coverl url
RETURNS:
- *api.QueryDocumentResp
- error: the return error if any occurs
func (*Client) ReadDocument ¶
func (c *Client) ReadDocument(documentId string, readParam *api.ReadDocumentParam) (*api.ReadDocumentResp, error)
ReadDocument - get document token for client sdk
PARAMS:
- documentId: id of document in doc service
- readParam: expiration time of the doc's html
RETURNS:
- *api.ReadDocumentResp
- error: the return error if any occurs
func (*Client) RegisterDocument ¶
func (c *Client) RegisterDocument(regParam *api.RegDocumentParam) (*api.RegDocumentResp, error)
RegisterDocument - register document in doc service
PARAMS:
- regParam title and format of the document being registered
RETURNS:
- *api.RegDocumentResp: id and document location in bos
- error: the return error if any occurs
type DocClientConfiguration ¶
DocClientConfiguration defines the config components structure by user.