keymanager

package
v0.0.0-...-cb7f019 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RawDataLength          = 42
	PublicKeyCipherNumber  = 12
	SecretKeyCipherNumber  = 5
	CongitoAttrPublicKeyId = "custom:public_key_id"
	CongitoAttrSecretKeyId = "custom:secret_key_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKey

type ApiKey struct {
	*apigateway.ApiKey
	UsagePlanKey *apigateway.UsagePlanKey
}

type CognitoAssociateData

type CognitoAssociateData struct {
	IsPublic bool
	ApiKeyId string
}

type Keys

type Keys struct {
	UserId string
	Name   string
	Config *buyte.AWSConfig
}

func NewKeyManager

func NewKeyManager(userId string, name string, awsConfig *buyte.AWSConfig) *Keys

func (*Keys) AssociateApiKeyIdsWithCognito

func (k *Keys) AssociateApiKeyIdsWithCognito(data []*CognitoAssociateData) error

func (*Keys) CreateApiKey

func (k *Keys) CreateApiKey(key string, isPublic bool) (*ApiKey, error)

func (*Keys) DeleteApiKey

func (k *Keys) DeleteApiKey(apiKeyId string) error

Just some helpers...

func (*Keys) DeleteUserKeys

func (k *Keys) DeleteUserKeys() error

func (*Keys) GenerateKey

func (k *Keys) GenerateKey(isPublic bool) string

Jump to

Keyboard shortcuts

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