Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateDocument(doc *Document) (err error)
- func (c *Client) CreatePersonalSeal(seal *PersonalSeal) (err error)
- func (c *Client) CreateSeal(seal *Seal) (err error)
- func (c *Client) CreateUser(user *User) (err error)
- func (c *Client) CreateUserCert(userID string) (certSN string, err error)
- func (c *Client) GetToken() (token string, err error)
- func (c *Client) SignDocumentForKeyword(si *KeywordSignInfo) (signedDocURL string, err error)
- func (c *Client) SignDocumentForPosition(si *PositionSignInfo) (signedDocURL string, err error)
- type DocType
- type Document
- type KeywordSignInfo
- type Options
- type PersonalSeal
- type PositionSignInfo
- type Response
- type Seal
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents GFA-ESS client.
func (*Client) CreateDocument ¶
CreateDocument creates an ess document.
func (*Client) CreatePersonalSeal ¶
func (c *Client) CreatePersonalSeal(seal *PersonalSeal) (err error)
CreatePersonalSeal creates an ess seal.
func (*Client) CreateSeal ¶
CreateSeal creates an ess seal.
func (*Client) CreateUser ¶
CreateUser creates an ess user.
func (*Client) CreateUserCert ¶
CreateUserCert creates the certification for an ess user.
func (*Client) SignDocumentForKeyword ¶ added in v0.2.0
func (c *Client) SignDocumentForKeyword(si *KeywordSignInfo) (signedDocURL string, err error)
SignDocumentForKeyword signs an ess document for specified keyword.
func (*Client) SignDocumentForPosition ¶ added in v0.2.0
func (c *Client) SignDocumentForPosition(si *PositionSignInfo) (signedDocURL string, err error)
SignDocumentForPosition signs an ess document for specified postion.
type Document ¶
type Document struct { DocName string `json:"docName"` DocType DocType `json:"docType"` DocContentBase64 string `json:"docContentBase64"` UserID string `json:"userId"` UUID string `json:"uuid"` }
Document represents an ess document.
type KeywordSignInfo ¶ added in v0.2.0
type KeywordSignInfo struct { DocID string `json:"docId"` SealID string `json:"sealId"` Keyword string `json:"keyword"` Scope int `json:"scope"` Start int `json:"start"` End int `json:"end"` Zoom int `json:"zoom"` }
KeywordSignInfo represents the keyword signing info to an ess document.
type PersonalSeal ¶
type PersonalSeal struct { Name string `json:"name"` CertSN string `json:"certSN"` UUID string `json:"uuid"` }
PersonalSeal represents an ess personal seal.
type PositionSignInfo ¶ added in v0.2.0
type PositionSignInfo struct { DocID string `json:"docId"` SealID string `json:"sealId"` PageNumber string `json:"pageNumber"` X int `json:"x"` Y int `json:"y"` Zoom int `json:"zoom"` Reason string `json:"reason"` Remark string `json:"remark"` }
PositionSignInfo represents the position signing info to an ess document.
type Response ¶
type Response struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
Response represents the response of http request.