api

package
v0.0.0-...-2b8671f Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateUserSchema = errors.New("error creating user schema")
	ErrCreateUser       = errors.New("error creating user")
	ErrGetUser          = errors.New("error getting user")
	ErrListUsers        = errors.New("error listing users")
	ErrUpdateUser       = errors.New("error updating user")
)

Functions

func Context

func Context(duration time.Duration, author *uuid.UUID) (api_context, context.CancelFunc)

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(db *sqlx.DB, lib sqlt.SQLT) *API

func (*API) CreateUser

func (api *API) CreateUser(ctx api_context, user *entity.User) error

func (*API) CreateUserSchema

func (api *API) CreateUserSchema(ctx context.Context) error

func (*API) GetUser

func (api *API) GetUser(ctx api_context, id uuid.UUID) (*entity.User, error)

func (*API) ListUsers

func (api *API) ListUsers(ctx api_context, query entity.UserListInput) ([]entity.User, error)

func (*API) UpdateUser

func (api *API) UpdateUser(ctx api_context, user *entity.User) error

func (*API) UserJob

func (api *API) UserJob(ctx api_context) error

Jump to

Keyboard shortcuts

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