domain

package
v0.0.0-...-c99b2d3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeKey

type CodeKey int

Error status code key.

const (
	CodeInternal CodeKey = iota
	CodeNotFound
	CodeAlreadyExists
	CodeInvalidArgument
)

Error status codes.

type Error

type Error struct {
	Code    CodeKey
	Message string
}

Error structure.

func (*Error) Error

func (e *Error) Error() string

Getting error message.

type SortOptions

type SortOptions struct {
	// Get first n elements.
	First *int32
	// Get last n elements.
	Last *int32
	// Before cursor.
	Before ksuid.KSUID
	// After cursor.
	After ksuid.KSUID
}

Query sorting options.

type UserSession

type UserSession struct {
	// User session id.
	Id ksuid.KSUID
	// User session owner.
	UserId ksuid.KSUID
	// User session payload.
	Payload string
	// User ip address.
	Ip string
	// User session expires in.
	ExpiresIn time.Time
}

User auth session.

type UserSignInInput

type UserSignInInput struct {
	// Username.
	Username string
	// User password hash.
	Password string
	// Client secret key.
	Secret string
	// User ip address.
	Ip string
}

User SignIn auth input.

type UserSignUpInput

type UserSignUpInput struct {
	// Unique username.
	Username string
	// Unique user email address.
	Email string
	// User password hash.
	Password string
	// Client secret key.
	Secret string
	// Verification code.
	Code uint64
	// User ip address.
	Ip string
}

User SignUp auth input.

type UserTokens

type UserTokens struct {
	// JWT access token.
	Access string
	// Refresh token.
	Refresh string
}

User auth tokens.

Jump to

Keyboard shortcuts

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