Documentation
¶
Index ¶
- Variables
- type BootstrapRequest
- type GroupRequest
- type MemberRequest
- type MemberUpdateRequest
- type MonitorPatchRequest
- type MonitorRequest
- type NodeListenIP
- type NodePatchRequest
- type NodePortRange
- type NodeRequest
- type OrganizationRequest
- type ProxyProtocolRequest
- type RegistrationTokenRequest
- type ResourceScopeRequest
- type RoleRequest
- type RuleBatchRequest
- type RuleCopyRequest
- type RuleImportRequest
- type RuleMatchRequest
- type RuleRequest
- type RuleUpstreamRequest
- type TargetGroupMemberRequest
- type TargetGroupRequest
- type TargetRequest
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidRequest = errors.New("invalid request")
Functions ¶
This section is empty.
Types ¶
type BootstrapRequest ¶
type BootstrapRequest struct {
OrganizationName string `json:"organization_name"`
OrganizationSlug string `json:"organization_slug"`
}
func ValidateBootstrapRequest ¶
func ValidateBootstrapRequest(request BootstrapRequest) (BootstrapRequest, error)
type GroupRequest ¶
func ValidateGroupRequest ¶
func ValidateGroupRequest(request GroupRequest) (GroupRequest, error)
type MemberRequest ¶
type MemberRequest struct {
Email string `json:"email"`
RoleIDs []string `json:"role_ids"`
Status string `json:"status"`
}
func ValidateMemberRequest ¶
func ValidateMemberRequest(request MemberRequest) (MemberRequest, error)
type MemberUpdateRequest ¶
type MemberUpdateRequest struct {
RoleIDs *[]string `json:"role_ids"`
Status string `json:"status"`
}
func ValidateMemberUpdateRequest ¶
func ValidateMemberUpdateRequest(request MemberUpdateRequest) (MemberUpdateRequest, error)
type MonitorPatchRequest ¶
type MonitorPatchRequest struct {
Name *string `json:"name"`
GroupIDs *[]string `json:"group_ids"`
}
func ValidateMonitorPatchRequest ¶
func ValidateMonitorPatchRequest(request MonitorPatchRequest) (MonitorPatchRequest, error)
type MonitorRequest ¶
func ValidateMonitorRequest ¶
func ValidateMonitorRequest(request MonitorRequest) (MonitorRequest, error)
type NodeListenIP ¶
type NodePatchRequest ¶
type NodePatchRequest struct {
Name *string `json:"name"`
GroupIDs *[]string `json:"group_ids"`
ListenIPs *[]NodeListenIP `json:"listen_ips"`
PortRanges *[]NodePortRange `json:"port_ranges"`
PublicDescription *string `json:"public_description"`
}
func ValidateNodePatchRequest ¶
func ValidateNodePatchRequest(request NodePatchRequest) (NodePatchRequest, error)
type NodePortRange ¶
type NodeRequest ¶
type NodeRequest struct {
Name string `json:"name"`
GroupIDs []string `json:"group_ids"`
ListenIPs []NodeListenIP `json:"listen_ips"`
PortRanges []NodePortRange `json:"port_ranges"`
PublicDescription string `json:"public_description"`
}
func ValidateNodeRequest ¶
func ValidateNodeRequest(request NodeRequest) (NodeRequest, error)
type OrganizationRequest ¶
func ValidateOrganizationRequest ¶
func ValidateOrganizationRequest(request OrganizationRequest) (OrganizationRequest, error)
type ProxyProtocolRequest ¶
type RegistrationTokenRequest ¶
type RegistrationTokenRequest struct {
TTLHours int `json:"ttl_hours"`
}
func ValidateRegistrationTokenRequest ¶
func ValidateRegistrationTokenRequest(request RegistrationTokenRequest) (RegistrationTokenRequest, error)
type ResourceScopeRequest ¶
type RoleRequest ¶
type RoleRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Permissions []string `json:"permissions"`
ResourceScopes []ResourceScopeRequest `json:"resource_scopes"`
}
func ValidateRoleRequest ¶
func ValidateRoleRequest(request RoleRequest) (RoleRequest, error)
type RuleBatchRequest ¶
func ValidateRuleBatchRequest ¶
func ValidateRuleBatchRequest(request RuleBatchRequest) (RuleBatchRequest, error)
type RuleCopyRequest ¶
func ValidateRuleCopyRequest ¶
func ValidateRuleCopyRequest(request RuleCopyRequest) (RuleCopyRequest, error)
type RuleImportRequest ¶
type RuleImportRequest struct {
DryRun bool `json:"dry_run"`
}
type RuleMatchRequest ¶
type RuleRequest ¶
type RuleRequest struct {
Name string `json:"name"`
Tags []string `json:"tags"`
NodeGroupID string `json:"node_group_id"`
ListenIP string `json:"listen_ip"`
ForwardingType string `json:"forwarding_type"`
Protocol string `json:"protocol"`
Port int `json:"port"`
Match RuleMatchRequest `json:"match"`
ProxyProtocol ProxyProtocolRequest `json:"proxy_protocol"`
Upstream RuleUpstreamRequest `json:"upstream"`
Enabled bool `json:"enabled"`
}
func ValidateRuleRequest ¶
func ValidateRuleRequest(request RuleRequest) (RuleRequest, error)
type RuleUpstreamRequest ¶
type TargetGroupRequest ¶
type TargetGroupRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Scheduler string `json:"scheduler"`
Members []TargetGroupMemberRequest `json:"members"`
}
func ValidateTargetGroupRequest ¶
func ValidateTargetGroupRequest(request TargetGroupRequest) (TargetGroupRequest, error)
type TargetRequest ¶
type TargetRequest struct {
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
Enabled bool `json:"enabled"`
TargetGroupIDs *[]string `json:"target_group_ids"`
}
func ValidateTargetRequest ¶
func ValidateTargetRequest(request TargetRequest) (TargetRequest, error)
type ValidationError ¶
func (*ValidationError) Error ¶
func (err *ValidationError) Error() string
func (*ValidationError) Unwrap ¶
func (err *ValidationError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.