routes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthLogin       = APIBasePath + "/auth/login"
	Devices         = APIBasePath + "/devices"
	Workspaces      = APIBasePath + "/workspaces"
	DeviceApprovals = APIBasePath + "/device-approvals"
)
View Source
const (
	GET    = "GET"
	POST   = "POST"
	PUT    = "PUT"
	DELETE = "DELETE"
	PATCH  = "PATCH"
)
View Source
const (
	APIBasePath = "/api/" + APIVersion
)
View Source
const APIVersion = "v1"

Variables

View Source
var (
	LoginRoute = Route{
		Method: POST,
		Path:   AuthLogin,
	}

	ListWorkspacesRoute = Route{
		Method: GET,
		Path:   Workspaces,
	}

	RegisterDeviceRoute = Route{
		Method: POST,
		Path:   Devices,
	}

	ListDevicesRoute = Route{
		Method: GET,
		Path:   Devices,
	}

	ListDeviceApprovalsRoute = Route{
		Method: GET,
		Path:   DeviceApprovals,
	}
)
View Source
var Device = DeviceRoutes{}
View Source
var DeviceApproval = DeviceApprovalRoutes{}
View Source
var Secret = SecretRoutes{}
View Source
var Workspace = WorkspaceRoutes{}

Functions

func BuildURL

func BuildURL(baseURL, routePath string) string

Types

type DeviceApprovalRoutes

type DeviceApprovalRoutes struct{}

func (DeviceApprovalRoutes) Approve

func (d DeviceApprovalRoutes) Approve(approvalID string) string

func (DeviceApprovalRoutes) GetByID

func (d DeviceApprovalRoutes) GetByID(approvalID string) string

func (DeviceApprovalRoutes) Reject

func (d DeviceApprovalRoutes) Reject(approvalID string) string

type DeviceRoutes

type DeviceRoutes struct{}

func (DeviceRoutes) GetByID

func (d DeviceRoutes) GetByID(deviceID string) string

func (DeviceRoutes) Revoke

func (d DeviceRoutes) Revoke(deviceID string) string

type Route

type Route struct {
	Method string
	Path   string
}

type SecretRoutes

type SecretRoutes struct{}

type WorkspaceRoutes

type WorkspaceRoutes struct{}

func (WorkspaceRoutes) GetBySlug

func (w WorkspaceRoutes) GetBySlug(orgSlug, workspaceSlug string) string

func (WorkspaceRoutes) GetWorkspaceKey

func (w WorkspaceRoutes) GetWorkspaceKey(orgSlug, workspaceSlug string) string

func (WorkspaceRoutes) InitializeKey

func (w WorkspaceRoutes) InitializeKey(orgSlug, workspaceSlug string) string

func (WorkspaceRoutes) InviteDevice

func (w WorkspaceRoutes) InviteDevice(orgSlug, workspaceSlug string) string

func (WorkspaceRoutes) SecretByKey

func (w WorkspaceRoutes) SecretByKey(orgSlug, workspaceSlug, secretKey string) string

func (WorkspaceRoutes) Secrets

func (w WorkspaceRoutes) Secrets(orgSlug, workspaceSlug string) string

Jump to

Keyboard shortcuts

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