handlers

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_ALLOWED_REFERER_FOR_IGASONDERZOEK_REG  = "ALLOWED_REFERER_FOR_IGASONDERZOEK_REG"
	ENV_IGASONDERZOEK_USERMANAGEMENT_URL       = "IGASONDERZOEK_USERMANAGEMENT_URL"
	ENV_IGASONDERZOEK_EMAIL_CLIENT_SERVICE_URL = "IGASONDERZOEK_EMAIL_CLIENT_SERVICE_URL"

	ENV_IGASONDERZOEK_EMAIL_INVITE_SUBJECT  = "IGASONDERZOEK_EMAIL_INVITE_SUBJECT"
	ENV_IGASONDERZOEK_PATH_TO_TEMPLATE_FILE = "IGASONDERZOEK_PATH_TO_TEMPLATE_FILE"

	ENV_IGASONDERZOEK_EMAIL_RESULTS_SUBJECT         = "IGASONDERZOEK_EMAIL_RESULTS_SUBJECT"
	ENV_IGASONDERZOEK_PATH_TO_RESULTS_TEMPLATE_FILE = "IGASONDERZOEK_PATH_TO_RESULTS_TEMPLATE_FILE"

	DefaultGRPCMaxMsgSize = 4194304
)

Variables

This section is empty.

Functions

func ConnectToEmailService added in v0.7.0

func ConnectToEmailService(addr string, maxMsgSize int) (client email_client_service.EmailClientServiceApiClient, close func() error)

func ConnectToUserManagement added in v0.7.0

func ConnectToUserManagement(addr string, maxMsgSize int) (client umAPI.UserManagementApiClient, close func() error)

func ExtractToken added in v0.7.0

func ExtractToken() gin.HandlerFunc

func HasRole added in v0.7.0

func HasRole(targetRoles []string) gin.HandlerFunc

func RecordBodyHandl added in v0.3.0

func RecordBodyHandl(c *gin.Context)

func ResolveTemplate added in v0.7.0

func ResolveTemplate(tempName string, templateDef string, contentInfos map[string]string) (content string, err error)

func SanitizeCode added in v0.5.0

func SanitizeCode(code string) string

func ValidateToken added in v0.7.0

func ValidateToken() gin.HandlerFunc

Types

type HttpEndpoints

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

func NewHTTPHandler

func NewHTTPHandler(
	instanceID string,
	dbService *db.SelfSwabbingExtDBService,
	apiKeys []string,
	allowEntryCodeUpload bool,
	samplerConfig types.SamplerConfig,
) *HttpEndpoints

func (*HttpEndpoints) AddCodeCheckerAPI

func (h *HttpEndpoints) AddCodeCheckerAPI(rg *gin.RouterGroup)

func (*HttpEndpoints) AddIgasonderzoekAPI added in v0.7.0

func (h *HttpEndpoints) AddIgasonderzoekAPI(rg *gin.RouterGroup)

func (*HttpEndpoints) AddSamplerAPI added in v0.2.0

func (h *HttpEndpoints) AddSamplerAPI(rg *gin.RouterGroup)

type SendMessageToReq added in v0.7.0

type SendMessageToReq struct {
	Participants []struct {
		Reference  string `json:"reference"`
		ChildIndex int    `json:"childIndex"`
	} `json:"participants"`
}

Jump to

Keyboard shortcuts

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