routes

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AuthLogin       = APIBasePath + "/auth/login"
	Devices         = APIBasePath + "/devices"
	Projects        = APIBasePath + "/projects"
	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,
	}

	ListProjectsRoute = Route{
		Method: GET,
		Path:   Projects,
	}

	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 Project = ProjectRoutes{}
View Source
var Secret = SecretRoutes{}

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 ProjectRoutes added in v0.4.0

type ProjectRoutes struct{}

func (ProjectRoutes) Create added in v0.7.1

func (w ProjectRoutes) Create(orgSlug string) string

func (ProjectRoutes) EnvironmentBySlug added in v0.6.0

func (w ProjectRoutes) EnvironmentBySlug(orgSlug, projectSlug, envSlug string) string

func (ProjectRoutes) Environments added in v0.6.0

func (w ProjectRoutes) Environments(orgSlug, projectSlug string) string

func (ProjectRoutes) GetBySlug added in v0.4.0

func (w ProjectRoutes) GetBySlug(orgSlug, projectSlug string) string

func (ProjectRoutes) GetProjectKey added in v0.4.0

func (w ProjectRoutes) GetProjectKey(orgSlug, projectSlug string) string

func (ProjectRoutes) InitializeKey added in v0.4.0

func (w ProjectRoutes) InitializeKey(orgSlug, projectSlug string) string

func (ProjectRoutes) InviteDevice added in v0.4.0

func (w ProjectRoutes) InviteDevice(orgSlug, projectSlug string) string

func (ProjectRoutes) SecretByKey added in v0.4.0

func (w ProjectRoutes) SecretByKey(orgSlug, projectSlug, secretKey string) string

func (ProjectRoutes) Secrets added in v0.4.0

func (w ProjectRoutes) Secrets(orgSlug, projectSlug string) string

type Route

type Route struct {
	Method string
	Path   string
}

type SecretRoutes

type SecretRoutes struct{}

Jump to

Keyboard shortcuts

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