request

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAccountID      = errors.New("invalid account_id. account_id must be a non-empty string")
	ErrInvalidCredentialType = errors.New("invalid credential_type")
	ErrInvalidCredential     = errors.New("invalid credential")
	ErrUnsupportedAuthMethod = errors.New("unsupported auth method")
)

Functions

This section is empty.

Types

type AuthRequestDto

type AuthRequestDto struct {
	AccountID  string     `json:"account_id"`
	Credential Credential `json:"credential"`
}

func (*AuthRequestDto) ToCredential

func (auth *AuthRequestDto) ToCredential() (*entities.Credential, error)

func (*AuthRequestDto) Validate

func (auth *AuthRequestDto) Validate() error

type Credential

type Credential struct {
	Type  entities.CredentialType `json:"type"`
	Value interface{}             `json:"value"`
}

type PaginationRequestDto

type PaginationRequestDto struct {
	Count  int `json:"count"`
	Offset int `json:"offset"`
}

type SearchRequestDto

type SearchRequestDto struct {
	Query     string              `json:"query"`
	SortOrder constants.SortOrder `json:"order"`
	PaginationRequestDto
}

Jump to

Keyboard shortcuts

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