services

package
v0.0.0-...-c25ae0e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAnyRole

func HasAnyRole(ctx context.Context, roles []model.Role) (bool, error)

HasAnyRole authorizes a user as having any in a collection of given roles

func HasRole

func HasRole(ctx context.Context, role model.Role) (bool, error)

HasRole authorizes a user as having a given role

func NewFetchMetrics

func NewFetchMetrics(
	_ Config,
) func(c context.Context, st time.Time, et time.Time) (models.MetricsDigest, error)

NewFetchMetrics returns a service for fetching a metrics digest

func NewInvokeGeneratePDF

func NewInvokeGeneratePDF(config Config, client *lambda.Lambda, functionName string) func(cxt context.Context, html string) ([]byte, error)

NewInvokeGeneratePDF returns a function that saves the metadata of an uploaded file

Types

type Config

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

Config holds common configured object for services

func NewConfig

func NewConfig(logger *zap.Logger, ldc *ld.LDClient) Config

NewConfig returns a Config for services

Jump to

Keyboard shortcuts

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