Documentation
¶
Index ¶
- Variables
- type BootstrapRequest
- type DNSCredentialRequest
- type DNSInstanceRequest
- type DNSManagedRecordRequest
- type GroupRequest
- type HealthCheckRequest
- type HealthMonitorScopeRequest
- type HealthTargetScopeRequest
- type MemberRequest
- type MemberUpdateRequest
- type MonitorPatchRequest
- type MonitorRequest
- type NodeDNSPublishAddress
- type NodeListenIP
- type NodePatchRequest
- type NodePortRange
- type NodeRequest
- type NotificationChannelRequest
- 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 DNSCredentialRequest ¶ added in v0.1.19
type DNSCredentialRequest struct {
Name string `json:"name"`
Provider string `json:"provider"`
Secret string `json:"secret"`
}
func ValidateDNSCredentialRequest ¶ added in v0.1.19
func ValidateDNSCredentialRequest(request DNSCredentialRequest, secretRequired bool) (DNSCredentialRequest, error)
type DNSInstanceRequest ¶ added in v0.1.20
type DNSInstanceRequest struct {
ManagedRecordID string `json:"managed_record_id"`
Name string `json:"name"`
Priority int `json:"priority"`
Enabled bool `json:"enabled"`
NodeGroupIDs []string `json:"node_group_ids"`
AnswerCount int `json:"answer_count"`
Condition map[string]any `json:"condition"`
Action map[string]any `json:"action"`
NotificationChannelIDs []string `json:"notification_channel_ids"`
}
func ValidateDNSInstanceRequest ¶ added in v0.1.20
func ValidateDNSInstanceRequest(request DNSInstanceRequest) (DNSInstanceRequest, error)
type DNSManagedRecordRequest ¶ added in v0.1.20
type DNSManagedRecordRequest struct {
DNSCredentialID string `json:"dns_credential_id"`
CredentialZoneID string `json:"credential_zone_id"`
RecordHost string `json:"record_host"`
RecordName string `json:"record_name"`
RecordType string `json:"record_type"`
TTL int `json:"ttl"`
Proxied bool `json:"proxied"`
}
func ValidateDNSManagedRecordRequest ¶ added in v0.1.20
func ValidateDNSManagedRecordRequest(request DNSManagedRecordRequest) (DNSManagedRecordRequest, error)
type GroupRequest ¶
func ValidateGroupRequest ¶
func ValidateGroupRequest(request GroupRequest) (GroupRequest, error)
type HealthCheckRequest ¶ added in v0.1.19
type HealthCheckRequest struct {
Name string `json:"name"`
ProbeType string `json:"probe_type"`
IntervalSeconds int `json:"interval_seconds"`
TimeoutSeconds int `json:"timeout_seconds"`
Enabled bool `json:"enabled"`
TargetScope HealthTargetScopeRequest `json:"target_scope"`
MonitorScope HealthMonitorScopeRequest `json:"monitor_scope"`
Config map[string]any `json:"config"`
}
func ValidateHealthCheckRequest ¶ added in v0.1.19
func ValidateHealthCheckRequest(request HealthCheckRequest) (HealthCheckRequest, error)
type HealthMonitorScopeRequest ¶ added in v0.1.19
type HealthTargetScopeRequest ¶ added in v0.1.19
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 NodeDNSPublishAddress ¶ added in v0.1.20
type NodeDNSPublishAddress struct {
AddressType string `json:"address_type"`
Address string `json:"address"`
Enabled bool `json:"enabled"`
}
func (*NodeDNSPublishAddress) UnmarshalJSON ¶ added in v0.1.20
func (address *NodeDNSPublishAddress) UnmarshalJSON(data []byte) 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"`
DNSPublishAddresses *[]NodeDNSPublishAddress `json:"dns_publish_addresses"`
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"`
DNSPublishAddresses []NodeDNSPublishAddress `json:"dns_publish_addresses"`
PublicDescription string `json:"public_description"`
}
func ValidateNodeRequest ¶
func ValidateNodeRequest(request NodeRequest) (NodeRequest, error)
type NotificationChannelRequest ¶ added in v0.1.20
type NotificationChannelRequest struct {
Name string `json:"name"`
ChannelType string `json:"channel_type"`
Config map[string]any `json:"config"`
Secret string `json:"secret"`
Enabled bool `json:"enabled"`
}
func ValidateNotificationChannelRequest ¶ added in v0.1.20
func ValidateNotificationChannelRequest(request NotificationChannelRequest, secretRequired bool) (NotificationChannelRequest, 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"`
FailurePolicy string `json:"failure_policy"`
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.