certificates

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Revoke

func Revoke(ctx context.Context, param RevokeParam) (err errors.CodeError)

func SaveExchangeKey

func SaveExchangeKey(ctx context.Context, param SaveExchangeKeyParam) (err errors.CodeError)

func SaveRoot

func SaveRoot(ctx context.Context, param SaveRootParam) (err errors.CodeError)

Types

type GetExchangeKeyParam

type GetExchangeKeyParam struct {
	AppId string `json:"appId"`
}

type GetExchangeKeyResult

type GetExchangeKeyResult struct {
	Has         bool   `json:"has"`
	ExchangeKey []byte `json:"exchangeKey"`
}

func GetExchangeKey

func GetExchangeKey(ctx context.Context, param GetExchangeKeyParam) (result GetExchangeKeyResult, err errors.CodeError)

type IssueParam

type IssueParam struct {
	AppId      string `json:"appId"`
	AppName    string `json:"appName"`
	ExpireDays int    `json:"expireDays"`
}

type IssueResult

type IssueResult struct {
	PublicPEM  []byte `json:"publicPem"`
	PrivatePEM []byte `json:"privatePem"`
}

func Issue

func Issue(ctx context.Context, param IssueParam) (result IssueResult, err errors.CodeError)

type RevokeParam

type RevokeParam struct {
	AppId string `json:"appId"`
}

type RootParam

type RootParam struct {
	Kind string `json:"kind"`
}

type RootResult

type RootResult struct {
	Has            bool          `json:"has"`
	Kind           string        `json:"kind"`
	AppId          string        `json:"appId"`
	PublicPEM      []byte        `json:"publicPem"`
	PrivatePEM     []byte        `json:"privatePem"`
	Password       []byte        `json:"password"`
	ExchangeKeyTTL time.Duration `json:"exchangeKeyTtl"`
}

func Root

func Root(ctx context.Context, param RootParam) (result RootResult, err errors.CodeError)

type SaveExchangeKeyParam

type SaveExchangeKeyParam struct {
	AppId       string        `json:"appId"`
	ExchangeKey []byte        `json:"exchangeKey"`
	TTL         time.Duration `json:"ttl"`
}

type SaveRootParam

type SaveRootParam struct {
	Kind           string        `json:"kind"`
	AppId          string        `json:"appId"`
	PublicPEM      []byte        `json:"publicPem"`
	PrivatePEM     []byte        `json:"privatePem"`
	Password       []byte        `json:"password"`
	ExchangeKeyTTL time.Duration `json:"exchangeKeyTtl"`
}

type VerifyParam

type VerifyParam struct {
	PublicPEM []byte `json:"publicPem"`
}

type VerifyResult

type VerifyResult struct {
	Ok bool `json:"ok"`
}

func Verify

func Verify(ctx context.Context, param VerifyParam) (result VerifyResult, err errors.CodeError)

Jump to

Keyboard shortcuts

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