services

package
v0.0.0-...-c6e12e2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCreatePasskeyRequest = errors.New("invalid create passkey request")
	ErrCreatePasskey               = errors.New("create passkey")
)
View Source
var (
	ErrInvalidDeletePasskeyRequest = errors.New("invalid delete passkey request")
	ErrDeletePasskey               = errors.New("delete passkey")
)
View Source
var (
	ErrInvalidGetPasskeyRequest = errors.New("invalid get passkey request")
	ErrGetPasskey               = errors.New("get passkey")
)
View Source
var (
	ErrInvalidUpdatePasskeyRequest = errors.New("invalid update passkey request")
	ErrUpdatePasskey               = errors.New("update passkey")
)

Functions

func ExpiresInToTime

func ExpiresInToTime(expiresIn *time.Duration) *time.Time

Types

type CreatePasskey

type CreatePasskey interface {
	Exec(ctx context.Context, data *CreatePasskeyRequest) (*CreatePasskeyResponse, error)
}

func NewCreatePasskey

func NewCreatePasskey(dao dao.CreatePasskey) CreatePasskey

type CreatePasskeyRequest

type CreatePasskeyRequest struct {
	Namespace string                 `validate:"required,min=1,max=256"`
	Passkey   string                 `validate:"required,min=4,max=4096"`
	Reward    map[string]interface{} `validate:"omitempty"`
	ExpiresIn *time.Duration         `validate:"omitempty"`
}

type CreatePasskeyResponse

type CreatePasskeyResponse struct {
	ID        string
	Namespace string
	Reward    map[string]interface{}
	ExpiresAt *time.Time
	CreatedAt time.Time
}

type DeletePasskey

type DeletePasskey interface {
	Exec(ctx context.Context, data *DeletePasskeyRequest) (*DeletePasskeyResponse, error)
}

func NewDeletePasskey

func NewDeletePasskey(dao dao.DeletePasskey) DeletePasskey

type DeletePasskeyRequest

type DeletePasskeyRequest struct {
	ID        string `validate:"required,len=36"`
	Namespace string `validate:"required,min=1,max=256"`
	Passkey   string `validate:"required_if=Validate true,omitempty,min=4,max=4096"`
	Validate  bool   `validate:"omitempty"`
}

type DeletePasskeyResponse

type DeletePasskeyResponse struct {
	ID        string
	Namespace string
	Reward    map[string]interface{}
	ExpiresAt *time.Time
	CreatedAt time.Time
	UpdatedAt *time.Time
}

type GetPasskey

type GetPasskey interface {
	Exec(ctx context.Context, data *GetPasskeyRequest) (*GetPasskeyResponse, error)
}

func NewGetPasskey

func NewGetPasskey(dao dao.GetPasskey) GetPasskey

type GetPasskeyRequest

type GetPasskeyRequest struct {
	ID        string `validate:"required,len=36"`
	Namespace string `validate:"required,min=1,max=256"`
	Passkey   string `validate:"required_if=Validate true,omitempty,min=4,max=4096"`
	Validate  bool   `validate:"omitempty"`
}

type GetPasskeyResponse

type GetPasskeyResponse struct {
	ID        string
	Namespace string
	Reward    map[string]interface{}
	ExpiresAt *time.Time
	CreatedAt time.Time
	UpdatedAt *time.Time
}

type UpdatePasskey

type UpdatePasskey interface {
	Exec(ctx context.Context, data *UpdatePasskeyRequest) (*UpdatePasskeyResponse, error)
}

func NewUpdatePasskey

func NewUpdatePasskey(dao dao.UpdatePasskey) UpdatePasskey

type UpdatePasskeyRequest

type UpdatePasskeyRequest struct {
	ID        string                 `validate:"required,len=36"`
	Namespace string                 `validate:"required,min=1,max=256"`
	Passkey   string                 `validate:"required,min=4,max=4096"`
	Reward    map[string]interface{} `validate:"omitempty"`
	ExpiresIn *time.Duration         `validate:"omitempty"`
}

type UpdatePasskeyResponse

type UpdatePasskeyResponse struct {
	ID        string
	Namespace string
	Reward    map[string]interface{}
	ExpiresAt *time.Time
	CreatedAt time.Time
	UpdatedAt *time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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