model

package
v1.84.5 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthNKeyTypeNONE = iota
	AuthNKeyTypeJSON
)

Variables

This section is empty.

Functions

func DefaultExpiration

func DefaultExpiration() (time.Time, error)

Types

type AuthNKey

type AuthNKey struct {
	models.ObjectRoot

	KeyID          string
	ObjectType     ObjectType
	Type           AuthNKeyType
	ExpirationDate time.Time
	PrivateKey     []byte
}

type AuthNKeySearchKey

type AuthNKeySearchKey int32
const (
	AuthNKeyKeyUnspecified AuthNKeySearchKey = iota
	AuthNKeyKeyID
	AuthNKeyObjectID
	AuthNKeyObjectType
)

type AuthNKeySearchQuery

type AuthNKeySearchQuery struct {
	Key    AuthNKeySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type AuthNKeySearchRequest

type AuthNKeySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn AuthNKeySearchKey
	Asc           bool
	Queries       []*AuthNKeySearchQuery
}

func (*AuthNKeySearchRequest) EnsureLimit

func (r *AuthNKeySearchRequest) EnsureLimit(limit uint64) error

type AuthNKeySearchResponse

type AuthNKeySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*AuthNKeyView
	Sequence    uint64
	Timestamp   time.Time
}

type AuthNKeyState

type AuthNKeyState int32
const (
	AuthNKeyStateActive AuthNKeyState = iota
	AuthNKeyStateInactive
	AuthNKeyStateRemoved
)

type AuthNKeyType

type AuthNKeyType int32

type AuthNKeyView

type AuthNKeyView struct {
	ID             string
	ObjectID       string
	ObjectType     ObjectType
	AuthIdentifier string
	Type           AuthNKeyType
	Sequence       uint64
	CreationDate   time.Time
	ExpirationDate time.Time
	PublicKey      []byte
	State          AuthNKeyState
}

type Key

type Key struct {
	Key    *crypto.CryptoValue
	Expiry time.Time
}

func (*Key) IsValid

func (k *Key) IsValid() bool

type KeyPair

type KeyPair struct {
	es_models.ObjectRoot

	Usage      KeyUsage
	Algorithm  string
	PrivateKey *Key
	PublicKey  *Key
}

func (*KeyPair) IsValid

func (k *KeyPair) IsValid() bool

type KeySearchKey

type KeySearchKey int32
const (
	KeySearchKeyUnspecified KeySearchKey = iota
	KeySearchKeyID
	KeySearchKeyPrivate
	KeySearchKeyExpiry
	KeySearchKeyUsage
)

type KeySearchQuery

type KeySearchQuery struct {
	Key    KeySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type KeySearchRequest

type KeySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn KeySearchKey
	Asc           bool
	Queries       []*KeySearchQuery
}

func (*KeySearchRequest) EnsureLimit

func (r *KeySearchRequest) EnsureLimit(limit uint64) error

type KeySearchResponse

type KeySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*KeyView
}

type KeyUsage

type KeyUsage int32
const (
	KeyUsageSigning KeyUsage = iota
)

func (KeyUsage) String

func (u KeyUsage) String() string

type KeyView

type KeyView struct {
	ID        string
	Private   bool
	Expiry    time.Time
	Algorithm string
	Usage     KeyUsage
	Key       *crypto.CryptoValue
	Sequence  uint64
}

type ObjectType

type ObjectType int32
const (
	AuthNKeyObjectTypeUnspecified ObjectType = iota
	AuthNKeyObjectTypeUser
	AuthNKeyObjectTypeApplication
)

type PublicKey

type PublicKey struct {
	ID        string
	Algorithm string
	Usage     KeyUsage
	Key       interface{}
}

func PublicKeyFromKeyView

func PublicKeyFromKeyView(key *KeyView, alg crypto.EncryptionAlgorithm) (*PublicKey, error)

func PublicKeysFromKeyView

func PublicKeysFromKeyView(keys []*KeyView, alg crypto.EncryptionAlgorithm) ([]*PublicKey, error)

type SigningKey

type SigningKey struct {
	ID        string
	Algorithm string
	Key       interface{}
	Sequence  uint64
}

func SigningKeyFromKeyView

func SigningKeyFromKeyView(key *KeyView, alg crypto.EncryptionAlgorithm) (*SigningKey, error)

Jump to

Keyboard shortcuts

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