api

package
v0.0.0-...-6f440d7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: LGPL-2.1 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//CodeNotFound - resource not found
	CodeNotFound errorCode = iota

	//CodeAlreadyRegistered - participant already registered
	CodeAlreadyRegistered

	//CodeRedisError - error communicating with redis
	CodeRedisError

	//CodeQRError - error creating qr code
	CodeQRError

	//CodeNotAuthenticated - not authenticated
	CodeNotAuthenticated

	//CodeForbidden - user does not have access to resource
	CodeForbidden

	//CodeBadRequest - bad data provided by client
	CodeBadRequest

	//CodeConnectionError - failed to connect to something
	CodeConnectionError

	//CodeUnexpectedResponse - unexpected response (e.g. from AD)
	CodeUnexpectedResponse

	//CodeInternalErrorGeneral - for general errors.
	CodeInternalErrorGeneral
)

Variables

This section is empty.

Functions

func TimeWithinLimits

func TimeWithinLimits(start, end, startLimit, endLimit time.Time) bool

TimeWithinLimits - checks that the start and end times are within the bounds of limit

Types

type Server

type Server struct {
	Port  string                `yaml:"port"`
	Debug bool                  `yaml:"debug"`
	Redis redis.Connector       `yaml:"redis"`
	RPC   rpc.Server            `yaml:"rpc"`
	Trovo googletrovo.Connector `yaml:"trovo"`

	GcalURL string `yaml:"gcalUrl"`
	QrURL   string `yaml:"qrUrl"`

	ParticipantURL string `yaml:"participantUrl"`

	AbsenteeCronString string `yaml:"absentCron"`
}

Server - api server object

func (*Server) Run

func (s *Server) Run() error

Run starts the api

Jump to

Keyboard shortcuts

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