services

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiRouter added in v0.3.0

func ApiRouter(deps *ApiServices) http.Handler

func HealthEndpoint added in v0.3.0

func HealthEndpoint() http.Handler

func RecoveryMiddleware added in v0.3.0

func RecoveryMiddleware(next http.Handler) http.Handler

func TimeToTimestamp

func TimeToTimestamp(value *time.Time) *timestamp.Timestamp

func TimestampToTime

func TimestampToTime(value *timestamp.Timestamp) time.Time

func TracesMiddleware added in v0.3.0

func TracesMiddleware(next http.Handler) http.Handler

func WebsiteRouter added in v0.3.0

func WebsiteRouter() *mux.Router

Types

type ApiServices added in v0.3.0

type ApiServices struct {
	Config        *config.AppConfig
	DeviceManager *devices.DeviceManager
	Wg            wgembed.WireGuardInterface
}

type DeviceService

type DeviceService struct {
	DeviceManager *devices.DeviceManager
}

func (*DeviceService) AddDevice

func (d *DeviceService) AddDevice(ctx context.Context, req *proto.AddDeviceReq) (*proto.Device, error)

func (*DeviceService) DeleteDevice

func (d *DeviceService) DeleteDevice(ctx context.Context, req *proto.DeleteDeviceReq) (*empty.Empty, error)

func (*DeviceService) ListAllDevices

func (*DeviceService) ListDevices

type FSHandler404 added in v0.3.0

type FSHandler404 = func(w http.ResponseWriter, r *http.Request) (doDefaultFileServe bool)

credit: https://gist.github.com/lummie/91cd1c18b2e32fa9f316862221a6fd5c

type ServerService

type ServerService struct {
	Config *config.AppConfig
	Wg     wgembed.WireGuardInterface
}

func (*ServerService) Info

func (s *ServerService) Info(ctx context.Context, req *proto.InfoReq) (*proto.InfoRes, error)

Jump to

Keyboard shortcuts

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