object

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateUserSpec

type UpdateUserSpec struct {
	Email *string `json:"email"`
}

func (UpdateUserSpec) ToUpdateObjectSpec

func (updateSpec UpdateUserSpec) ToUpdateObjectSpec() *object.UpdateObjectSpec

type UserListParamParser

type UserListParamParser struct{}

func (UserListParamParser) GetDefaultSortBy

func (parser UserListParamParser) GetDefaultSortBy() string

func (UserListParamParser) GetSupportedSortBys

func (parser UserListParamParser) GetSupportedSortBys() []string

func (UserListParamParser) ParseValue

func (parser UserListParamParser) ParseValue(val string, sortBy string) (interface{}, error)

type UserService

type UserService struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewService

func NewService(env service.Env, objectSvc object.Service) *UserService

func (UserService) Create

func (svc UserService) Create(ctx context.Context, userSpec UserSpec) (*UserSpec, error)

func (UserService) DeleteByUserId

func (svc UserService) DeleteByUserId(ctx context.Context, userId string) error

func (UserService) GetByUserId

func (svc UserService) GetByUserId(ctx context.Context, userId string) (*UserSpec, error)

func (UserService) List

func (svc UserService) List(ctx context.Context, listParams service.ListParams) ([]UserSpec, error)

func (UserService) Routes

func (svc UserService) Routes() ([]service.Route, error)

func (UserService) UpdateByUserId

func (svc UserService) UpdateByUserId(ctx context.Context, userId string, userSpec UpdateUserSpec) (*UserSpec, error)

type UserSpec

type UserSpec struct {
	UserId    string    `json:"userId"    validate:"omitempty,valid_object_id"`
	Email     *string   `json:"email"`
	CreatedAt time.Time `json:"createdAt"`
}

func NewUserSpecFromObjectSpec

func NewUserSpecFromObjectSpec(objectSpec *object.ObjectSpec) (*UserSpec, error)

func (UserSpec) ToCreateObjectSpec

func (spec UserSpec) ToCreateObjectSpec() (*object.CreateObjectSpec, error)

Jump to

Keyboard shortcuts

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