api

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInternalServerError = &apimodels.UnexpectedErrorStatusCode{
	StatusCode: http.StatusInternalServerError,
	Response:   apimodels.UnexpectedError{Error: "internal server error"},
}

Functions

This section is empty.

Types

type API

type API struct {
	apimodels.UnimplementedHandler

	SelectKeyService  SelectKeyService
	SearchKeysService SearchKeysService
	SignClaimsService SignClaimsService
}

func (*API) GetPublicKey

func (api *API) GetPublicKey(
	ctx context.Context, params apimodels.GetPublicKeyParams,
) (apimodels.GetPublicKeyRes, error)

func (*API) Healthcheck

func (api *API) Healthcheck(ctx context.Context) (apimodels.HealthcheckRes, error)

func (*API) ListPublicKeys

func (api *API) ListPublicKeys(
	ctx context.Context, params apimodels.ListPublicKeysParams,
) (apimodels.ListPublicKeysRes, error)

func (*API) NewError

func (api *API) NewError(ctx context.Context, err error) *apimodels.UnexpectedErrorStatusCode

func (*API) Ping

func (api *API) Ping(_ context.Context) (apimodels.PingRes, error)

func (*API) SignClaims

func (api *API) SignClaims(
	ctx context.Context, req apimodels.SignClaimsReq, params apimodels.SignClaimsParams,
) (apimodels.SignClaimsRes, error)

type SearchKeysService

type SearchKeysService interface {
	SearchKeys(ctx context.Context, request services.SearchKeysRequest) ([]*jwa.JWK, error)
}

type SelectKeyService

type SelectKeyService interface {
	SelectKey(ctx context.Context, request services.SelectKeyRequest) (*jwa.JWK, error)
}

type SignClaimsService

type SignClaimsService interface {
	SignClaims(ctx context.Context, request services.SignClaimsRequest) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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