sign

package module
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 10 Imported by: 0

README

sign

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateBody

type ActivateBody struct {
	CredentialId string `json:"credentialId"`
}

type ActivateCaResponse

type ActivateCaResponse struct {
	ExpiresIn int    `json:"expiresIn"`
	Sad       string `json:"sad"`
}

type BodyRequestPDFSignSSL

type BodyRequestPDFSignSSL struct {
	PdfData                   string `json:"pdfData"`
	SadData                   string `json:"sadData"`
	CadData                   string `json:"cadData"`
	Reason                    string `json:"reason"`
	Location                  string `json:"location"`
	CertifyLevel              string `json:"certifyLevel"`
	HashAlgorithm             string `json:"hashAlgorithm"`
	OverwriteOriginal         bool   `json:"overwriteOriginal"`
	VisibleSignature          string `json:"visibleSignature"`
	VisibleSignaturePage      int    `json:"visibleSignaturePage"`
	VisibleSignatureRectangle string `json:"visibleSignatureRectangle"`
	VisibleSignatureImagePath string `json:"visibleSignatureImagePath"`
}

type BodyRequestSign

type BodyRequestSign struct {
	Token        string
	CredentialId string
	SignBody     JsonSigningBody
}

type BodyRequestSignSSL

type BodyRequestSignSSL struct {
	CadData          string `json:"cadData"`
	DocumentId       string `json:"documentId"`
	BcResponseURL    string `json:"bcResponseURL"`
	SignatureContent string `json:"signatureContent"`
}

type Context

type Context interface {
	Error() error
	InitSSL(SSLConFig) Context
	//ModePRD() Context
	//ModeUAT() Context
	Activate(BodyRequestSign, *ActivateCaResponse) Context
	ActivateByHost(string, BodyRequestSign, *ActivateCaResponse) Context
	JsonSigning(BodyRequestSign, *JsonSigningResponse) Context
	JsonSigningByHost(string, BodyRequestSign, *JsonSigningResponse) Context
	EncodeBase64(interface{}, *bytes.Buffer) Context
	JsonSigningSSL(BodyRequestSignSSL, *JsonSigningResponse) Context
	JsonSigningPDFSSL(string, BodyRequestPDFSignSSL, *JsonPDFSigningResponse) Context
	JsonSigningSSLDhp(BodyRequestSignSSL, *JsonSigningResponse) Context
	JsonSigningSSLByHost(string, BodyRequestSignSSL, *JsonSigningResponse) Context
	ListCredentials(BodyRequestSign, *JsoncredentialsListResponse) Context
}

func Init

func Init(host string) Context

type FilePathSSL

type FilePathSSL struct {
	CertFile *string `json:"certFile"`
	KeyFile  *string `json:"keyFile"`
	CaFile   *string `json:"caFile"`
}

type JsonCredentials

type JsonCredentials struct {
	CredentialID  string      `json:"credentialId"`
	Name          string      `json:"name"`
	Status        interface{} `json:"status"`
	CertificateDn string      `json:"certificateDn"`
	AuthInfo      string      `json:"authInfo"`
	ExpiredDate   string      `json:"expiredDate"`
	LtvInfo       interface{} `json:"ltvInfo"`
}

type JsonPDFSigningResponse

type JsonPDFSigningResponse struct {
	ResponseCode    int    `json:"responseCode"`
	ResponseMessage string `json:"responseMessage"`
	PdfData         string `json:"pdfData"`
}

type JsonSigningBody

type JsonSigningBody struct {
	SadData          string `json:"sadData"`
	DocumentId       string `json:"documentId"`
	BcResponseURL    string `json:"bcResponseURL"`
	SignatureContent string `json:"signatureContent"`
}

type JsonSigningResponse

type JsonSigningResponse struct {
	ExpiresIn       int    `json:"responseCode"`
	ResponseMessage string `json:"responseMessage"`
	JwsData         string `json:"jwsData"`
}

type JsoncredentialsListResponse

type JsoncredentialsListResponse struct {
	TotalResult int               `json:"totalResult"`
	Credentials []JsonCredentials `json:"credentials"`
}

type Response

type Response struct {
	Code   int
	Status string
	Header http.Header
	Result []byte
}

type SSLConFig

type SSLConFig struct {
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
	CaFile   string `json:"caFile"`
}

Jump to

Keyboard shortcuts

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