model

package
v0.0.0-...-1f982fd Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CtxUserIDKey key = iota

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID uuid.UUID

ID represent unique value of stored data entity.

type Kind

type Kind string

Kind is a type of saving data.

const (
	// Unspecified kind of saving data.
	Unspecified Kind = "unknown"

	// CardCredentials kind of saving data.
	CardCredentials Kind = "card"

	// Text kind of saving data.
	Text Kind = "text"

	// Credentials kind of saving data.
	Credentials Kind = "credentials"

	// Binary kind of saving data.
	Binary Kind = "binary"
)

func ToKind

func ToKind(k server.Kind) Kind

ToKind method converts protobuf to custom Kind.

func (Kind) String

func (k Kind) String() string

String represents k as string.

func (Kind) ToPB

func (k Kind) ToPB() server.Kind

ToPB method converts custom type Kind to protobuf value.

type Save

type Save struct {
	ID   string
	Kind Kind
	Data string
	Meta string
}

Save model struct.

type UserCredentials

type UserCredentials struct {
	Login    string
	Password string
}

UserCredentials is a struct for the user register and/or login calls.

type UserID

type UserID string

UserID is a user identification value.

Jump to

Keyboard shortcuts

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