Documentation
¶
Index ¶
- Constants
- Variables
- func BuildURL(baseURL, routePath string) string
- type DeviceApprovalRoutes
- type DeviceRoutes
- type Route
- type SecretRoutes
- type WorkspaceRoutes
- func (w WorkspaceRoutes) GetBySlug(orgSlug, workspaceSlug string) string
- func (w WorkspaceRoutes) GetWorkspaceKey(orgSlug, workspaceSlug string) string
- func (w WorkspaceRoutes) InitializeKey(orgSlug, workspaceSlug string) string
- func (w WorkspaceRoutes) InviteDevice(orgSlug, workspaceSlug string) string
- func (w WorkspaceRoutes) SecretByKey(orgSlug, workspaceSlug, secretKey string) string
- func (w WorkspaceRoutes) Secrets(orgSlug, workspaceSlug string) string
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 ¶
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 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
Click to show internal directories.
Click to hide internal directories.