http

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UseCacheQueryKey              = "useCache"
	UseMulticastQueryKey          = "useMulticast"
	UseEndpointsQueryKey          = "useEndpoints"
	TimeoutQueryKey               = "timeout"
	OwnershipStatusFilterQueryKey = "ownershipStatusFilter"
	TypeFilterQueryKey            = "typeFilter"
)
View Source
const (
	DeviceIDKey          = "deviceId"
	ResourceHrefKey      = "resourceHref"
	ResourcesPathKey     = "resources"
	ResourceLinksPathKey = "resource-links"

	ApplicationProtoJsonContentType = "application/protojson"
	ApplicationJsonContentType      = "application/json"

	Api       = "/api"
	ApiV1     = Api + "/v1"
	WellKnown = "/.well-known"
	Identity  = ApiV1 + "/identity"

	Devices             = ApiV1 + "/devices"
	Device              = Devices + "/{" + DeviceIDKey + "}"
	DeviceResourceLinks = Devices + "/{" + DeviceIDKey + "}/" + ResourceLinksPathKey
	DeviceResourceLink  = DeviceResourceLinks + "/{" + ResourceHrefKey + "}"
	DeviceResources     = Device + "/" + ResourcesPathKey
	DeviceResource      = DeviceResources + "/{" + ResourceHrefKey + "}"
	OwnDevice           = Device + "/own"
	DisownDevice        = Device + "/disown"
	OnboardDevice       = Device + "/onboard"
	OffboardDevice      = Device + "/offboard"

	Initialize             = ApiV1 + "/initialize"
	Reset                  = ApiV1 + "/reset"
	IdentityCertificate    = Identity + "/certificate"
	WellKnownJWKs          = WellKnown + "/jwks.json"
	WellKnownConfiguration = WellKnown + "/configuration"
)

HTTP Service URIs.

Variables

This section is empty.

Functions

func FinishInitialize added in v0.2.0

func FinishInitialize(state string) string

Types

type RequestHandler

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

type Service

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

func New

func New(ctx context.Context, serviceName string, config configHttp.Config, clientApplicationServer *grpc.ClientApplicationServer, fileWatcher *fsnotify.Watcher, logger pkgLog.Logger, tracerProvider trace.TracerProvider) (*Service, error)

New creates new HTTP service

func (*Service) Address

func (s *Service) Address() string

func (*Service) Close added in v0.2.0

func (s *Service) Close() error

Close 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