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