controller

package
v0.0.0-...-92f7cd3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventProtoToEvent

func EventProtoToEvent(entityProto calendarpb.Event) (*event.Event, error)

EventProtoToEvent convs EventProto To Event

func EventToEventProto

func EventToEventProto(entity event.Event) (*calendarpb.Event, error)

EventToEventProto convs Event To EventProto

func EventsListToEventProtosList

func EventsListToEventProtosList(items []event.Event) ([]*calendarpb.Event, error)

EventsListToEventProtosList convs Events List To EventProtos List

Types

type EventController

type EventController struct {
	Service event.IService
	Logger  log.ILogger
}

EventController is a handler for grpc requests

func (EventController) EventCreate

func (c EventController) EventCreate(ctx context.Context, entityProto *calendarpb.Event) (*calendarpb.ResponseEvent, error)

EventCreate creates an entity

func (EventController) EventDelete

func (c EventController) EventDelete(ctx context.Context, idProto *calendarpb.EventID) (*calendarpb.Status, error)

EventDelete deletes an entity

func (EventController) EventListOnDay

EventListOnDay returns a list of events on a day

func (EventController) EventListOnMonth

EventListOnMonth returns a list of events on a month

func (EventController) EventListOnWeek

EventListOnWeek returns a list of events on a week

func (EventController) EventUpdate

func (c EventController) EventUpdate(ctx context.Context, entityProto *calendarpb.Event) (*calendarpb.ResponseEvent, error)

EventUpdate updates an entity

Jump to

Keyboard shortcuts

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