doc

package
v0.9.209 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_SERVICE_DOMAIN = "doc.bj.baidubce.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of DOC service is a kind of BceClient, so derived from BceClient

func NewClient

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

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

func (c *Client) DeleteDocument(documentId string) error

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

func (c *Client) PublishDocument(documentId string) error

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

type DocClientConfiguration struct {
	Ak       string
	Sk       string
	Endpoint string
}

DocClientConfiguration defines the config components structure by user.

Directories

Path Synopsis
Package api defines all APIs supported by the DOC service of BCE.
Package api defines all APIs supported by the DOC service of BCE.

Jump to

Keyboard shortcuts

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