endpoints

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package endpoints defines all route handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	KmsMgr *kms.Manager
}

Endpoints 定义 endpoint 方法

func New

func New(options ...Option) *Endpoints

New 创建 Endpoints 对象.

func (*Endpoints) DescribeKey

func (e *Endpoints) DescribeKey(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) Health

func (e *Endpoints) Health(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) KmsCreateKey

func (e *Endpoints) KmsCreateKey(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) KmsDecrypt

func (e *Endpoints) KmsDecrypt(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) KmsEncrypt

func (e *Endpoints) KmsEncrypt(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) KmsGenerateDataKey

func (e *Endpoints) KmsGenerateDataKey(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) KmsRotateKeyVersion

func (e *Endpoints) KmsRotateKeyVersion(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) Routes

func (e *Endpoints) Routes() []httpserver.Endpoint

Routes 返回 endpoints 的所有 endpoint 方法,也就是 route.

type Option

type Option func(*Endpoints)

func WithKmsManager

func WithKmsManager(mgr *kms.Manager) Option

Directories

Path Synopsis
Package apierrors defines all service errors.
Package apierrors defines all service errors.

Jump to

Keyboard shortcuts

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