eventtype

package
v0.0.0-...-b394ddd Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(api *operations.TutorAPI, db *ent.Client)

Init sets event type route handlers.

Types

type Service

type Service struct {
	Type *ent.EventTypeClient
}

Service holds an ent event type client.

func (*Service) CreateType

func (s *Service) CreateType(ctx context.Context, category *ent.EventType) (*ent.EventType, error)

CreateType returns a new created type or an error.

func (*Service) DeleteTypeByID

func (s *Service) DeleteTypeByID(ctx context.Context, id uuid.UUID) error

DeleteTypeByID returns an error.

func (*Service) ListType

func (s *Service) ListType(ctx context.Context) ([]*ent.EventType, error)

ListType returns a type list or an error.

func (*Service) ListTypeEventsByID

func (s *Service) ListTypeEventsByID(ctx context.Context, id uuid.UUID) ([]*ent.Event, error)

ListTypeEventsByID returns an event list with a certain type or an error.

func (*Service) ReadTypeByID

func (s *Service) ReadTypeByID(ctx context.Context, id uuid.UUID) (*ent.EventType, error)

ReadTypeByID returns a type or an error.

func (*Service) UpdateTypeByID

func (s *Service) UpdateTypeByID(ctx context.Context, id uuid.UUID, category *ent.EventType) (*ent.EventType, error)

UpdateTypeByID returns an existing updated type or an error.

Jump to

Keyboard shortcuts

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