model

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthNKeyKeyID      = "key_id"
	AuthNKeyObjectID   = "object_id"
	AuthNKeyObjectType = "object_type"
)
View Source
const (
	KeyKeyID     = "id"
	KeyPrivate   = "private"
	KeyUsage     = "usage"
	KeyAlgorithm = "algorithm"
	KeyExpiry    = "expiry"
)

Variables

This section is empty.

Functions

func AuthNKeyToModel

func AuthNKeyToModel(key *AuthNKeyView) *model.AuthNKeyView

func AuthNKeysToModel

func AuthNKeysToModel(keys []*AuthNKeyView) []*model.AuthNKeyView

func KeyViewToModel

func KeyViewToModel(key *KeyView) *model.KeyView

func KeyViewsToModel

func KeyViewsToModel(keys []*KeyView) []*model.KeyView

func KeysFromPairEvent

func KeysFromPairEvent(event *models.Event) (*KeyView, *KeyView, error)

Types

type AuthNKeySearchKey

type AuthNKeySearchKey key_model.AuthNKeySearchKey

func (AuthNKeySearchKey) ToColumnName

func (key AuthNKeySearchKey) ToColumnName() string

type AuthNKeySearchQuery

type AuthNKeySearchQuery key_model.AuthNKeySearchQuery

func (AuthNKeySearchQuery) GetKey

func (AuthNKeySearchQuery) GetMethod

func (req AuthNKeySearchQuery) GetMethod() domain.SearchMethod

func (AuthNKeySearchQuery) GetValue

func (req AuthNKeySearchQuery) GetValue() interface{}

type AuthNKeySearchRequest

type AuthNKeySearchRequest key_model.AuthNKeySearchRequest

func (AuthNKeySearchRequest) GetAsc

func (req AuthNKeySearchRequest) GetAsc() bool

func (AuthNKeySearchRequest) GetLimit

func (req AuthNKeySearchRequest) GetLimit() uint64

func (AuthNKeySearchRequest) GetOffset

func (req AuthNKeySearchRequest) GetOffset() uint64

func (AuthNKeySearchRequest) GetQueries

func (req AuthNKeySearchRequest) GetQueries() []repository.SearchQuery

func (AuthNKeySearchRequest) GetSortingColumn

func (req AuthNKeySearchRequest) GetSortingColumn() repository.ColumnKey

type AuthNKeyView

type AuthNKeyView struct {
	ID             string    `json:"keyId" gorm:"column:key_id;primary_key"`
	ObjectID       string    `json:"-" gorm:"column:object_id;primary_key"`
	ObjectType     int32     `json:"-" gorm:"column:object_type;primary_key"`
	AuthIdentifier string    `json:"-" gorm:"column:auth_identifier;primary_key"`
	Type           int32     `json:"type" gorm:"column:key_type"`
	ExpirationDate time.Time `json:"expirationDate" gorm:"column:expiration_date"`
	Sequence       uint64    `json:"-" gorm:"column:sequence"`
	CreationDate   time.Time `json:"-" gorm:"column:creation_date"`
	PublicKey      []byte    `json:"publicKey" gorm:"column:public_key"`
	State          int32     `json:"-" gorm:"column:state"`
}

func AuthNKeyViewFromModel

func AuthNKeyViewFromModel(key *model.AuthNKeyView) *AuthNKeyView

func (*AuthNKeyView) AppendEvent

func (k *AuthNKeyView) AppendEvent(event *models.Event) (err error)

func (*AuthNKeyView) AppendEventIfMyClientKey

func (k *AuthNKeyView) AppendEventIfMyClientKey(event *models.Event) (err error)

func (*AuthNKeyView) SetClientData

func (k *AuthNKeyView) SetClientData(event *models.Event) error

func (*AuthNKeyView) SetUserData

func (k *AuthNKeyView) SetUserData(event *models.Event) error

type KeySearchKey

type KeySearchKey key_model.KeySearchKey

func (KeySearchKey) ToColumnName

func (key KeySearchKey) ToColumnName() string

type KeySearchQuery

type KeySearchQuery key_model.KeySearchQuery

func (KeySearchQuery) GetKey

func (req KeySearchQuery) GetKey() repository.ColumnKey

func (KeySearchQuery) GetMethod

func (req KeySearchQuery) GetMethod() domain.SearchMethod

func (KeySearchQuery) GetValue

func (req KeySearchQuery) GetValue() interface{}

type KeySearchRequest

type KeySearchRequest key_model.KeySearchRequest

func (KeySearchRequest) GetAsc

func (req KeySearchRequest) GetAsc() bool

func (KeySearchRequest) GetLimit

func (req KeySearchRequest) GetLimit() uint64

func (KeySearchRequest) GetOffset

func (req KeySearchRequest) GetOffset() uint64

func (KeySearchRequest) GetQueries

func (req KeySearchRequest) GetQueries() []repository.SearchQuery

func (KeySearchRequest) GetSortingColumn

func (req KeySearchRequest) GetSortingColumn() repository.ColumnKey

type KeyView

type KeyView struct {
	ID        string              `json:"-" gorm:"column:id;primary_key"`
	Private   sql.NullBool        `json:"-" gorm:"column:private;primary_key"`
	Expiry    time.Time           `json:"-" gorm:"column:expiry"`
	Algorithm string              `json:"-" gorm:"column:algorithm"`
	Usage     int32               `json:"-" gorm:"column:usage"`
	Key       *crypto.CryptoValue `json:"-" gorm:"column:key"`
	Sequence  uint64              `json:"-" gorm:"column:sequence"`
}

Jump to

Keyboard shortcuts

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