pbehaviorics

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetICS

func GetICS(store Store, service Service) gin.HandlerFunc

Download pbehavior ICS by id @Summary Get pbehavior ICS by id @Description Get pbehavior ICS by id @Tags pbehavior-ics @ID pbehavior-ics-get-by-id @Produce octet-stream @Security ApiKeyAuth @Security BasicAuth @Param id path string true "pbehavior id" @Success 200 @Failure 404 {object} common.ErrorResponse @Router /pbehavior-ics/{id} [get]

Types

type Service

type Service interface {
	// GenICSFrom creates ICS calendar from pbehavior.
	GenICSFrom(pbh pbehaviorapi.PBehavior, maxPriority, minPriority int64) (ics.Calendar, error)
}

Service is used to implement ICS calendar generation.

func NewService

func NewService(timezoneConfigProvider config.TimezoneConfigProvider) Service

NewService creates new service.

type Store

type Store interface {
	GetOneBy(ctx context.Context, id string) (*pbehaviorapi.PBehavior, error)
	FindMaxPriority(ctx context.Context) (int64, error)
	FindMinPriority(ctx context.Context) (int64, error)
}

func NewStore

func NewStore(dbClient mongo.DbClient) Store

Jump to

Keyboard shortcuts

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