http

package
v2.24.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IDFilterQueryKey                = "idFilter"
	EnrollmentGroupIDFilterQueryKey = "enrollmentGroupIdFilter"
	DeviceIDFilterQueryKey          = "deviceIdFilter"
)
View Source
const (
	API   = "/api"
	APIV1 = API + "/v1"

	ProvisioningRecords = APIV1 + "/provisioning-records"
)

HTTP Service URIs.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationConfig

type AuthorizationConfig struct {
	OwnerClaim       string `yaml:"ownerClaim" json:"ownerClaim"`
	validator.Config `yaml:",inline" json:",inline"`
}

func (*AuthorizationConfig) Validate

func (c *AuthorizationConfig) Validate() error

type Config

type Config struct {
	Connection    listener.Config     `yaml:",inline" json:",inline"`
	Authorization AuthorizationConfig `yaml:"authorization" json:"authorization"`
	Server        server.Config       `yaml:",inline" json:",inline"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Service

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

func New

func New(ctx context.Context, serviceName string, config Config, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider, store store.Store) (*Service, error)

New creates new HTTP service

func (*Service) Close

func (s *Service) Close() error

Shutdown ends serving

func (*Service) Serve

func (s *Service) Serve() error

Serve starts the service's HTTP server and blocks

Jump to

Keyboard shortcuts

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