service

package
v0.0.0-...-44e322f Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service holds data used by grpc functions.

func NewService

func NewService(db *sqlx.DB, verifier verifier, metaFetcher metaFetcher) *Service

NewService creates a new Service.

func (*Service) CreateCalendar

func (s *Service) CreateCalendar(ctx context.Context, in *pb.CreateCalendarRequest) (*pb.Calendar, error)

CreateCalendar creates a calendar.

func (*Service) CreateEntry

func (s *Service) CreateEntry(ctx context.Context, in *pb.CreateEntryRequest) (*pb.Entry, error)

CreateEntry creates a entry.

func (*Service) DeleteCalendar

func (s *Service) DeleteCalendar(ctx context.Context, in *pb.DeleteCalendarRequest) (*empty.Empty, error)

DeleteCalendar deletes the calendar.

func (*Service) DeleteEntry

func (s *Service) DeleteEntry(ctx context.Context, in *pb.DeleteEntryRequest) (*empty.Empty, error)

DeleteEntry deletes the entry.

func (*Service) GetCalendar

func (s *Service) GetCalendar(ctx context.Context, in *pb.GetCalendarRequest) (*pb.GetCalendarResponse, error)

GetCalendar returns a calendar.

func (*Service) GetUser

func (s *Service) GetUser(ctx context.Context, in *pb.GetUserRequest) (*pb.User, error)

GetUser returns a user info.

func (*Service) HealthCheck

func (s *Service) HealthCheck(ctx context.Context, in *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)

HealthCheck returns current status.

func (*Service) ListCalendarStats

ListCalendarStats lists calendar stats

func (*Service) ListCalendars

ListCalendars lists calendars.

func (*Service) ListEntries

func (s *Service) ListEntries(ctx context.Context, in *pb.ListEntriesRequest) (*pb.ListEntriesResponse, error)

ListEntries lists entries.

func (*Service) Serve

func (s *Service) Serve(addr string)

Serve serves the service

func (*Service) SignIn

func (s *Service) SignIn(ctx context.Context, in *pb.SignInRequest) (*pb.User, error)

SignIn validates the id token.

func (*Service) UpdateCalendar

func (s *Service) UpdateCalendar(ctx context.Context, in *pb.UpdateCalendarRequest) (*pb.Calendar, error)

UpdateCalendar updates the calendar.

func (*Service) UpdateEntry

func (s *Service) UpdateEntry(ctx context.Context, in *pb.UpdateEntryRequest) (*pb.Entry, error)

UpdateEntry updates the entry.

func (*Service) UpdateUser

func (s *Service) UpdateUser(ctx context.Context, in *pb.UpdateUserRequest) (*pb.User, error)

UpdateUser updates user info.

Jump to

Keyboard shortcuts

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