key

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package key provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(apiServer api.APIServer) *server

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type GenerateJsonWebKeyProperties

type GenerateJsonWebKeyProperties struct {
	Crv           JsonWebKeyCurveName   `json:"crv,omitempty"`
	KeyOperations []JsonWebKeyOperation `json:"key_ops,omitempty"`
	KeySize       *JsonWebKeySize       `json:"key_size,omitempty"`
	Kty           JsonWebKeyType        `json:"kty,omitempty"`
}

GenerateJsonWebKeyProperties defines model for GenerateJsonWebKeyProperties.

type JsonWebKey

type JsonWebKey = cloudkey.JsonWebKey

JsonWebKey defines model for JsonWebKey.

type JsonWebKeyCurveName

type JsonWebKeyCurveName = cloudkey.JsonWebKeyCurveName

JsonWebKeyCurveName defines model for JsonWebKeyCurveName.

type JsonWebKeyOperation

type JsonWebKeyOperation = cloudkey.JsonWebKeyOperation

JsonWebKeyOperation defines model for JsonWebKeyOperation.

type JsonWebKeySize

type JsonWebKeySize = int32

JsonWebKeySize defines model for JsonWebKeySize.

type JsonWebKeyType

type JsonWebKeyType = cloudkey.JsonWebKeyType

JsonWebKeyType defines model for JsonWebKeyType.

type JsonWebSignatureAlgorithm

type JsonWebSignatureAlgorithm = cloudkey.JsonWebSignatureAlgorithm

JsonWebSignatureAlgorithm defines model for JsonWebSignatureAlgorithm.

type JsonWebSignatureKey

type JsonWebSignatureKey = cloudkey.JsonWebKey

JsonWebSignatureKey defines model for JsonWebSignatureKey.

type Key

type Key = keyComposed

Key defines model for Key.

type KeyDoc

type KeyDoc struct {
	base.BaseDoc
	cloudkey.JsonWebKey
	KeySize       *int32            `json:"keySize,omitempty"`
	Created       base.NumericDate  `json:"iat"`
	NotBefore     *base.NumericDate `json:"nbf,omitempty"`
	NotAfter      *base.NumericDate `json:"exp,omitempty"`
	Exportable    bool              `json:"exportable"`
	Policy        base.DocLocator   `json:"policy"`
	PolicyVersion base.HexDigest    `json:"policyVersion"`
}

type KeyFields

type KeyFields struct {
	Iat     externalRef0.NumericDate     `json:"iat"`
	KeySize *JsonWebKeySize              `json:"key_size,omitempty"`
	Nbf     *externalRef0.NumericDate    `json:"nbf,omitempty"`
	Policy  externalRef0.ResourceLocator `json:"policy"`
}

KeyFields defines model for KeyFields.

type KeyPolicy

type KeyPolicy = keyPolicyComposed

KeyPolicy defines model for KeyPolicy.

type KeyPolicyDoc

type KeyPolicyDoc struct {
	base.BaseDoc
	DisplayName   string                       `json:"displayName"`
	KeyProperties GenerateJsonWebKeyProperties `json:"keyProperties"`
	Exportable    bool                         `json:"exportable"`
	Version       base.HexDigest               `json:"version"`
	ExpiryTime    *base.Period                 `json:"expiryTime,omitempty"`
}

type KeyPolicyFields

type KeyPolicyFields struct {
	ExpiryTime    *externalRef0.Period         `json:"expiryTime,omitempty"`
	Exportable    bool                         `json:"exportable"`
	KeyProperties GenerateJsonWebKeyProperties `json:"keyProperties"`
}

KeyPolicyFields defines model for KeyPolicyFields.

type KeyPolicyParameters

type KeyPolicyParameters struct {
	DisplayName   string                        `json:"displayName,omitempty"`
	ExpiryTime    *externalRef0.Period          `json:"expiryTime,omitempty"`
	Exportable    *bool                         `json:"exportable,omitempty"`
	KeyProperties *GenerateJsonWebKeyProperties `json:"keyProperties,omitempty"`
}

KeyPolicyParameters defines model for KeyPolicyParameters.

type KeyPolicyRef

type KeyPolicyRef = keyPolicyRefComposed

KeyPolicyRef defines model for KeyPolicyRef.

type KeyPolicyRefFields

type KeyPolicyRefFields struct {
	DisplayName string `json:"displayName"`
}

KeyPolicyRefFields defines model for KeyPolicyRefFields.

type KeyPolicyResponse

type KeyPolicyResponse = KeyPolicy

KeyPolicyResponse defines model for KeyPolicyResponse.

type KeyRef

type KeyRef = keyRefComposed

KeyRef defines model for KeyRef.

type KeyRefFields

type KeyRefFields struct {
	Exp *externalRef0.NumericDate `json:"exp,omitempty"`
	Iat externalRef0.NumericDate  `json:"iat"`
}

KeyRefFields defines model for KeyRefFields.

type KeyResponse

type KeyResponse = Key

KeyResponse defines model for KeyResponse.

type KeySpec

type KeySpec struct {
	Crv           JsonWebKeyCurveName                   `json:"crv,omitempty"`
	E             externalRef0.Base64RawURLEncodedBytes `json:"e,omitempty"`
	KeyOperations []JsonWebKeyOperation                 `json:"key_ops"`
	KeySize       *JsonWebKeySize                       `json:"key_size,omitempty"`
	KeyID         *string                               `json:"kid,omitempty"`
	Kty           JsonWebKeyType                        `json:"kty"`
	N             externalRef0.Base64RawURLEncodedBytes `json:"n,omitempty"`
	X             externalRef0.Base64RawURLEncodedBytes `json:"x,omitempty"`
	Y             externalRef0.Base64RawURLEncodedBytes `json:"y,omitempty"`
}

KeySpec these attributes should mostly confirm to JWK (RFC7517)

type LifetimeAction

type LifetimeAction struct {
	Trigger LifetimeTrigger `json:"trigger"`
}

LifetimeAction defines model for LifetimeAction.

func (*LifetimeAction) WriteToDigest

func (la *LifetimeAction) WriteToDigest(w io.Writer) (s int, err error)

type LifetimeTrigger

type LifetimeTrigger struct {
	PercentageAfterCreate *int32               `json:"percentageAfterCreate,omitempty"`
	TimeAfterCreate       *externalRef0.Period `json:"timeAfterCreate,omitempty"`
	TimeBeforeExpiry      *externalRef0.Period `json:"timeBeforeExpiry,omitempty"`
}

LifetimeTrigger defines model for LifetimeTrigger.

func (*LifetimeTrigger) WriteToDigest

func (lt *LifetimeTrigger) WriteToDigest(w io.Writer) (s int, err error)

type ServerInterface

type ServerInterface interface {
	// List key policies
	// (GET /v1/{namespaceKind}/{namespaceId}/key-policies)
	ListKeyPolicies(ctx echo.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) ListKeyPolicies

func (w *ServerInterfaceWrapper) ListKeyPolicies(ctx echo.Context) error

ListKeyPolicies converts echo context to params.

type SigningKeySpec

type SigningKeySpec struct {
	Alg           *JsonWebSignatureAlgorithm            `json:"alg,omitempty"`
	Crv           JsonWebKeyCurveName                   `json:"crv,omitempty"`
	E             externalRef0.Base64RawURLEncodedBytes `json:"e,omitempty"`
	KeyOperations []JsonWebKeyOperation                 `json:"key_ops"`
	KeySize       *JsonWebKeySize                       `json:"key_size,omitempty"`
	KeyID         *string                               `json:"kid,omitempty"`
	Kty           JsonWebKeyType                        `json:"kty"`
	N             externalRef0.Base64RawURLEncodedBytes `json:"n,omitempty"`
	X             externalRef0.Base64RawURLEncodedBytes `json:"x,omitempty"`

	// X5c Base64 encoded certificate chain
	CertificateChain []externalRef0.Base64RawURLEncodedBytes `json:"x5c,omitempty"`
	X5t              externalRef0.Base64RawURLEncodedBytes   `json:"x5t,omitempty"`
	X5tS256          externalRef0.Base64RawURLEncodedBytes   `json:"x5t#S256,omitempty"`
	Y                externalRef0.Base64RawURLEncodedBytes   `json:"y,omitempty"`
}

SigningKeySpec defines model for SigningKeySpec.

func (*SigningKeySpec) SetPublicKey

func (ks *SigningKeySpec) SetPublicKey(pubKey crypto.PublicKey) error

func (*SigningKeySpec) WriteToDigest

func (ks *SigningKeySpec) WriteToDigest(w io.Writer) (s int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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