Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.1-0.20220912230023-4a1477f6a8ba DO NOT EDIT.
Index ¶
- Constants
- type Group
- type GroupMinimum
- type GroupPatchOperation
- type GroupPatchOperationOp
- type GroupPatchOperationPath
- type Nameserver
- type NameserverGroup
- type NameserverGroupPatchOperation
- type NameserverGroupPatchOperationOp
- type NameserverGroupPatchOperationPath
- type NameserverGroupRequest
- type NameserverNsType
- type PatchApiDnsNameserversIdJSONBody
- type PatchApiDnsNameserversIdJSONRequestBody
- type PatchApiGroupsIdJSONBody
- type PatchApiGroupsIdJSONRequestBody
- type PatchApiRoutesIdJSONBody
- type PatchApiRoutesIdJSONRequestBody
- type PatchApiRulesIdJSONBody
- type PatchApiRulesIdJSONRequestBody
- type PatchMinimum
- type PatchMinimumOp
- type Peer
- type PeerMinimum
- type PostApiDnsNameserversJSONRequestBody
- type PostApiGroupsJSONBody
- type PostApiGroupsJSONRequestBody
- type PostApiRoutesJSONRequestBody
- type PostApiRulesJSONBody
- type PostApiRulesJSONRequestBody
- type PostApiSetupKeysJSONRequestBody
- type PostApiUsersJSONRequestBody
- type PutApiDnsNameserversIdJSONRequestBody
- type PutApiGroupsIdJSONBody
- type PutApiGroupsIdJSONRequestBody
- type PutApiPeersIdJSONBody
- type PutApiPeersIdJSONRequestBody
- type PutApiRoutesIdJSONRequestBody
- type PutApiRulesIdJSONBody
- type PutApiRulesIdJSONRequestBody
- type PutApiSetupKeysIdJSONRequestBody
- type PutApiUsersIdJSONRequestBody
- type Route
- type RoutePatchOperation
- type RoutePatchOperationOp
- type RoutePatchOperationPath
- type RouteRequest
- type Rule
- type RuleMinimum
- type RulePatchOperation
- type RulePatchOperationOp
- type RulePatchOperationPath
- type SetupKey
- type SetupKeyRequest
- type User
- type UserCreateRequest
- type UserRequest
- type UserStatus
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct { // Id Group ID Id string `json:"id"` // Name Group Name identifier Name string `json:"name"` // Peers List of peers object Peers []PeerMinimum `json:"peers"` // PeersCount Count of peers associated to the group PeersCount int `json:"peers_count"` }
Group defines model for Group.
type GroupMinimum ¶
type GroupMinimum struct { // Id Group ID Id string `json:"id"` // Name Group Name identifier Name string `json:"name"` // PeersCount Count of peers associated to the group PeersCount int `json:"peers_count"` }
GroupMinimum defines model for GroupMinimum.
type GroupPatchOperation ¶
type GroupPatchOperation struct { // Op Patch operation type Op GroupPatchOperationOp `json:"op"` // Path Group field to update in form /<field> Path GroupPatchOperationPath `json:"path"` // Value Values to be applied Value []string `json:"value"` }
GroupPatchOperation defines model for GroupPatchOperation.
type GroupPatchOperationOp ¶
type GroupPatchOperationOp string
GroupPatchOperationOp Patch operation type
const ( GroupPatchOperationOpAdd GroupPatchOperationOp = "add" GroupPatchOperationOpRemove GroupPatchOperationOp = "remove" GroupPatchOperationOpReplace GroupPatchOperationOp = "replace" )
Defines values for GroupPatchOperationOp.
type GroupPatchOperationPath ¶
type GroupPatchOperationPath string
GroupPatchOperationPath Group field to update in form /<field>
const ( GroupPatchOperationPathName GroupPatchOperationPath = "name" GroupPatchOperationPathPeers GroupPatchOperationPath = "peers" )
Defines values for GroupPatchOperationPath.
type Nameserver ¶ added in v0.9.8
type Nameserver struct { // Ip Nameserver IP Ip string `json:"ip"` // NsType Nameserver Type NsType NameserverNsType `json:"ns_type"` // Port Nameserver Port Port int `json:"port"` }
Nameserver defines model for Nameserver.
type NameserverGroup ¶ added in v0.9.8
type NameserverGroup struct { // Description Nameserver group description Description string `json:"description"` // Domains Nameserver group domain list Domains []string `json:"domains"` // Enabled Nameserver group status Enabled bool `json:"enabled"` // Groups Nameserver group tag groups Groups []string `json:"groups"` // Id Nameserver group ID Id string `json:"id"` // Name Nameserver group name Name string `json:"name"` // Nameservers Nameserver group Nameservers []Nameserver `json:"nameservers"` // Primary Nameserver group primary status Primary bool `json:"primary"` }
NameserverGroup defines model for NameserverGroup.
type NameserverGroupPatchOperation ¶ added in v0.9.8
type NameserverGroupPatchOperation struct { // Op Patch operation type Op NameserverGroupPatchOperationOp `json:"op"` // Path Nameserver group field to update in form /<field> Path NameserverGroupPatchOperationPath `json:"path"` // Value Values to be applied Value []string `json:"value"` }
NameserverGroupPatchOperation defines model for NameserverGroupPatchOperation.
type NameserverGroupPatchOperationOp ¶ added in v0.9.8
type NameserverGroupPatchOperationOp string
NameserverGroupPatchOperationOp Patch operation type
const ( NameserverGroupPatchOperationOpAdd NameserverGroupPatchOperationOp = "add" NameserverGroupPatchOperationOpRemove NameserverGroupPatchOperationOp = "remove" NameserverGroupPatchOperationOpReplace NameserverGroupPatchOperationOp = "replace" )
Defines values for NameserverGroupPatchOperationOp.
type NameserverGroupPatchOperationPath ¶ added in v0.9.8
type NameserverGroupPatchOperationPath string
NameserverGroupPatchOperationPath Nameserver group field to update in form /<field>
const ( NameserverGroupPatchOperationPathDescription NameserverGroupPatchOperationPath = "description" NameserverGroupPatchOperationPathDomains NameserverGroupPatchOperationPath = "domains" NameserverGroupPatchOperationPathEnabled NameserverGroupPatchOperationPath = "enabled" NameserverGroupPatchOperationPathGroups NameserverGroupPatchOperationPath = "groups" NameserverGroupPatchOperationPathName NameserverGroupPatchOperationPath = "name" NameserverGroupPatchOperationPathNameservers NameserverGroupPatchOperationPath = "nameservers" NameserverGroupPatchOperationPathPrimary NameserverGroupPatchOperationPath = "primary" )
Defines values for NameserverGroupPatchOperationPath.
type NameserverGroupRequest ¶ added in v0.9.8
type NameserverGroupRequest struct { // Description Nameserver group description Description string `json:"description"` // Domains Nameserver group domain list Domains []string `json:"domains"` // Enabled Nameserver group status Enabled bool `json:"enabled"` // Groups Nameserver group tag groups Groups []string `json:"groups"` // Name Nameserver group name Name string `json:"name"` // Nameservers Nameserver group Nameservers []Nameserver `json:"nameservers"` // Primary Nameserver group primary status Primary bool `json:"primary"` }
NameserverGroupRequest defines model for NameserverGroupRequest.
type NameserverNsType ¶ added in v0.9.8
type NameserverNsType string
NameserverNsType Nameserver Type
const (
NameserverNsTypeUdp NameserverNsType = "udp"
)
Defines values for NameserverNsType.
type PatchApiDnsNameserversIdJSONBody ¶ added in v0.9.8
type PatchApiDnsNameserversIdJSONBody = []NameserverGroupPatchOperation
PatchApiDnsNameserversIdJSONBody defines parameters for PatchApiDnsNameserversId.
type PatchApiDnsNameserversIdJSONRequestBody ¶ added in v0.9.8
type PatchApiDnsNameserversIdJSONRequestBody = PatchApiDnsNameserversIdJSONBody
PatchApiDnsNameserversIdJSONRequestBody defines body for PatchApiDnsNameserversId for application/json ContentType.
type PatchApiGroupsIdJSONBody ¶
type PatchApiGroupsIdJSONBody = []GroupPatchOperation
PatchApiGroupsIdJSONBody defines parameters for PatchApiGroupsId.
type PatchApiGroupsIdJSONRequestBody ¶
type PatchApiGroupsIdJSONRequestBody = PatchApiGroupsIdJSONBody
PatchApiGroupsIdJSONRequestBody defines body for PatchApiGroupsId for application/json ContentType.
type PatchApiRoutesIdJSONBody ¶ added in v0.8.9
type PatchApiRoutesIdJSONBody = []RoutePatchOperation
PatchApiRoutesIdJSONBody defines parameters for PatchApiRoutesId.
type PatchApiRoutesIdJSONRequestBody ¶ added in v0.8.9
type PatchApiRoutesIdJSONRequestBody = PatchApiRoutesIdJSONBody
PatchApiRoutesIdJSONRequestBody defines body for PatchApiRoutesId for application/json ContentType.
type PatchApiRulesIdJSONBody ¶
type PatchApiRulesIdJSONBody = []RulePatchOperation
PatchApiRulesIdJSONBody defines parameters for PatchApiRulesId.
type PatchApiRulesIdJSONRequestBody ¶
type PatchApiRulesIdJSONRequestBody = PatchApiRulesIdJSONBody
PatchApiRulesIdJSONRequestBody defines body for PatchApiRulesId for application/json ContentType.
type PatchMinimum ¶ added in v0.8.9
type PatchMinimum struct { // Op Patch operation type Op PatchMinimumOp `json:"op"` // Value Values to be applied Value []string `json:"value"` }
PatchMinimum defines model for PatchMinimum.
type PatchMinimumOp ¶ added in v0.8.9
type PatchMinimumOp string
PatchMinimumOp Patch operation type
const ( PatchMinimumOpAdd PatchMinimumOp = "add" PatchMinimumOpRemove PatchMinimumOp = "remove" PatchMinimumOpReplace PatchMinimumOp = "replace" )
Defines values for PatchMinimumOp.
type Peer ¶
type Peer struct { // Connected Peer to Management connection status Connected bool `json:"connected"` // DnsLabel Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud DnsLabel string `json:"dns_label"` // Groups Groups that the peer belongs to Groups []GroupMinimum `json:"groups"` // Hostname Hostname of the machine Hostname string `json:"hostname"` // Id Peer ID Id string `json:"id"` // Ip Peer's IP address Ip string `json:"ip"` // LastSeen Last time peer connected to Netbird's management service LastSeen time.Time `json:"last_seen"` // Name Peer's hostname Name string `json:"name"` // Os Peer's operating system and version Os string `json:"os"` // SshEnabled Indicates whether SSH server is enabled on this peer SshEnabled bool `json:"ssh_enabled"` // UiVersion Peer's desktop UI version UiVersion *string `json:"ui_version,omitempty"` // UserId User ID of the user that enrolled this peer UserId *string `json:"user_id,omitempty"` // Version Peer's daemon or cli version Version string `json:"version"` }
Peer defines model for Peer.
type PeerMinimum ¶
type PeerMinimum struct { // Id Peer ID Id string `json:"id"` // Name Peer's hostname Name string `json:"name"` }
PeerMinimum defines model for PeerMinimum.
type PostApiDnsNameserversJSONRequestBody ¶ added in v0.9.8
type PostApiDnsNameserversJSONRequestBody = NameserverGroupRequest
PostApiDnsNameserversJSONRequestBody defines body for PostApiDnsNameservers for application/json ContentType.
type PostApiGroupsJSONBody ¶
type PostApiGroupsJSONBody struct { Name string `json:"name"` Peers *[]string `json:"peers,omitempty"` }
PostApiGroupsJSONBody defines parameters for PostApiGroups.
type PostApiGroupsJSONRequestBody ¶
type PostApiGroupsJSONRequestBody PostApiGroupsJSONBody
PostApiGroupsJSONRequestBody defines body for PostApiGroups for application/json ContentType.
type PostApiRoutesJSONRequestBody ¶ added in v0.8.9
type PostApiRoutesJSONRequestBody = RouteRequest
PostApiRoutesJSONRequestBody defines body for PostApiRoutes for application/json ContentType.
type PostApiRulesJSONBody ¶
type PostApiRulesJSONBody struct { // Description Rule friendly description Description string `json:"description"` Destinations *[]string `json:"destinations,omitempty"` // Disabled Rules status Disabled bool `json:"disabled"` // Flow Rule flow, currently, only "bidirect" for bi-directional traffic is accepted Flow string `json:"flow"` // Name Rule name identifier Name string `json:"name"` Sources *[]string `json:"sources,omitempty"` }
PostApiRulesJSONBody defines parameters for PostApiRules.
type PostApiRulesJSONRequestBody ¶
type PostApiRulesJSONRequestBody PostApiRulesJSONBody
PostApiRulesJSONRequestBody defines body for PostApiRules for application/json ContentType.
type PostApiSetupKeysJSONRequestBody ¶
type PostApiSetupKeysJSONRequestBody = SetupKeyRequest
PostApiSetupKeysJSONRequestBody defines body for PostApiSetupKeys for application/json ContentType.
type PostApiUsersJSONRequestBody ¶ added in v0.9.8
type PostApiUsersJSONRequestBody = UserCreateRequest
PostApiUsersJSONRequestBody defines body for PostApiUsers for application/json ContentType.
type PutApiDnsNameserversIdJSONRequestBody ¶ added in v0.9.8
type PutApiDnsNameserversIdJSONRequestBody = NameserverGroupRequest
PutApiDnsNameserversIdJSONRequestBody defines body for PutApiDnsNameserversId for application/json ContentType.
type PutApiGroupsIdJSONBody ¶
type PutApiGroupsIdJSONBody struct { Name *string `json:"Name,omitempty"` Peers *[]string `json:"Peers,omitempty"` }
PutApiGroupsIdJSONBody defines parameters for PutApiGroupsId.
type PutApiGroupsIdJSONRequestBody ¶
type PutApiGroupsIdJSONRequestBody PutApiGroupsIdJSONBody
PutApiGroupsIdJSONRequestBody defines body for PutApiGroupsId for application/json ContentType.
type PutApiPeersIdJSONBody ¶
type PutApiPeersIdJSONBody struct { Name string `json:"name"` SshEnabled bool `json:"ssh_enabled"` }
PutApiPeersIdJSONBody defines parameters for PutApiPeersId.
type PutApiPeersIdJSONRequestBody ¶
type PutApiPeersIdJSONRequestBody PutApiPeersIdJSONBody
PutApiPeersIdJSONRequestBody defines body for PutApiPeersId for application/json ContentType.
type PutApiRoutesIdJSONRequestBody ¶ added in v0.8.9
type PutApiRoutesIdJSONRequestBody = RouteRequest
PutApiRoutesIdJSONRequestBody defines body for PutApiRoutesId for application/json ContentType.
type PutApiRulesIdJSONBody ¶
type PutApiRulesIdJSONBody struct { // Description Rule friendly description Description string `json:"description"` Destinations *[]string `json:"destinations,omitempty"` // Disabled Rules status Disabled bool `json:"disabled"` // Flow Rule flow, currently, only "bidirect" for bi-directional traffic is accepted Flow string `json:"flow"` // Name Rule name identifier Name string `json:"name"` Sources *[]string `json:"sources,omitempty"` }
PutApiRulesIdJSONBody defines parameters for PutApiRulesId.
type PutApiRulesIdJSONRequestBody ¶
type PutApiRulesIdJSONRequestBody PutApiRulesIdJSONBody
PutApiRulesIdJSONRequestBody defines body for PutApiRulesId for application/json ContentType.
type PutApiSetupKeysIdJSONRequestBody ¶
type PutApiSetupKeysIdJSONRequestBody = SetupKeyRequest
PutApiSetupKeysIdJSONRequestBody defines body for PutApiSetupKeysId for application/json ContentType.
type PutApiUsersIdJSONRequestBody ¶ added in v0.9.4
type PutApiUsersIdJSONRequestBody = UserRequest
PutApiUsersIdJSONRequestBody defines body for PutApiUsersId for application/json ContentType.
type Route ¶ added in v0.8.9
type Route struct { // Description Route description Description string `json:"description"` // Enabled Route status Enabled bool `json:"enabled"` // Id Route Id Id string `json:"id"` // Masquerade Indicate if peer should masquerade traffic to this route's prefix Masquerade bool `json:"masquerade"` // Metric Route metric number. Lowest number has higher priority Metric int `json:"metric"` // Network Network range in CIDR format Network string `json:"network"` // NetworkId Route network identifier, to group HA routes NetworkId string `json:"network_id"` // NetworkType Network type indicating if it is IPv4 or IPv6 NetworkType string `json:"network_type"` // Peer Peer Identifier associated with route Peer string `json:"peer"` }
Route defines model for Route.
type RoutePatchOperation ¶ added in v0.8.9
type RoutePatchOperation struct { // Op Patch operation type Op RoutePatchOperationOp `json:"op"` // Path Route field to update in form /<field> Path RoutePatchOperationPath `json:"path"` // Value Values to be applied Value []string `json:"value"` }
RoutePatchOperation defines model for RoutePatchOperation.
type RoutePatchOperationOp ¶ added in v0.8.9
type RoutePatchOperationOp string
RoutePatchOperationOp Patch operation type
const ( RoutePatchOperationOpAdd RoutePatchOperationOp = "add" RoutePatchOperationOpRemove RoutePatchOperationOp = "remove" RoutePatchOperationOpReplace RoutePatchOperationOp = "replace" )
Defines values for RoutePatchOperationOp.
type RoutePatchOperationPath ¶ added in v0.8.9
type RoutePatchOperationPath string
RoutePatchOperationPath Route field to update in form /<field>
const ( RoutePatchOperationPathDescription RoutePatchOperationPath = "description" RoutePatchOperationPathEnabled RoutePatchOperationPath = "enabled" RoutePatchOperationPathMasquerade RoutePatchOperationPath = "masquerade" RoutePatchOperationPathMetric RoutePatchOperationPath = "metric" RoutePatchOperationPathNetwork RoutePatchOperationPath = "network" RoutePatchOperationPathNetworkId RoutePatchOperationPath = "network_id" RoutePatchOperationPathPeer RoutePatchOperationPath = "peer" )
Defines values for RoutePatchOperationPath.
type RouteRequest ¶ added in v0.8.9
type RouteRequest struct { // Description Route description Description string `json:"description"` // Enabled Route status Enabled bool `json:"enabled"` // Masquerade Indicate if peer should masquerade traffic to this route's prefix Masquerade bool `json:"masquerade"` // Metric Route metric number. Lowest number has higher priority Metric int `json:"metric"` // Network Network range in CIDR format Network string `json:"network"` // NetworkId Route network identifier, to group HA routes NetworkId string `json:"network_id"` // Peer Peer Identifier associated with route Peer string `json:"peer"` }
RouteRequest defines model for RouteRequest.
type Rule ¶
type Rule struct { // Description Rule friendly description Description string `json:"description"` // Destinations Rule destination groups Destinations []GroupMinimum `json:"destinations"` // Disabled Rules status Disabled bool `json:"disabled"` // Flow Rule flow, currently, only "bidirect" for bi-directional traffic is accepted Flow string `json:"flow"` // Id Rule ID Id string `json:"id"` // Name Rule name identifier Name string `json:"name"` // Sources Rule source groups Sources []GroupMinimum `json:"sources"` }
Rule defines model for Rule.
type RuleMinimum ¶
type RuleMinimum struct { // Description Rule friendly description Description string `json:"description"` // Disabled Rules status Disabled bool `json:"disabled"` // Flow Rule flow, currently, only "bidirect" for bi-directional traffic is accepted Flow string `json:"flow"` // Name Rule name identifier Name string `json:"name"` }
RuleMinimum defines model for RuleMinimum.
type RulePatchOperation ¶
type RulePatchOperation struct { // Op Patch operation type Op RulePatchOperationOp `json:"op"` // Path Rule field to update in form /<field> Path RulePatchOperationPath `json:"path"` // Value Values to be applied Value []string `json:"value"` }
RulePatchOperation defines model for RulePatchOperation.
type RulePatchOperationOp ¶
type RulePatchOperationOp string
RulePatchOperationOp Patch operation type
const ( RulePatchOperationOpAdd RulePatchOperationOp = "add" RulePatchOperationOpRemove RulePatchOperationOp = "remove" RulePatchOperationOpReplace RulePatchOperationOp = "replace" )
Defines values for RulePatchOperationOp.
type RulePatchOperationPath ¶
type RulePatchOperationPath string
RulePatchOperationPath Rule field to update in form /<field>
const ( RulePatchOperationPathDescription RulePatchOperationPath = "description" RulePatchOperationPathDestinations RulePatchOperationPath = "destinations" RulePatchOperationPathDisabled RulePatchOperationPath = "disabled" RulePatchOperationPathFlow RulePatchOperationPath = "flow" RulePatchOperationPathName RulePatchOperationPath = "name" RulePatchOperationPathSources RulePatchOperationPath = "sources" )
Defines values for RulePatchOperationPath.
type SetupKey ¶
type SetupKey struct { // AutoGroups Setup key groups to auto-assign to peers registered with this key AutoGroups []string `json:"auto_groups"` // Expires Setup Key expiration date Expires time.Time `json:"expires"` // Id Setup Key ID Id string `json:"id"` // Key Setup Key value Key string `json:"key"` // LastUsed Setup key last usage date LastUsed time.Time `json:"last_used"` // Name Setup key name identifier Name string `json:"name"` // Revoked Setup key revocation status Revoked bool `json:"revoked"` // State Setup key status, "valid", "overused","expired" or "revoked" State string `json:"state"` // Type Setup key type, one-off for single time usage and reusable Type string `json:"type"` // UpdatedAt Setup key last update date UpdatedAt time.Time `json:"updated_at"` // UsedTimes Usage count of setup key UsedTimes int `json:"used_times"` // Valid Setup key validity status Valid bool `json:"valid"` }
SetupKey defines model for SetupKey.
type SetupKeyRequest ¶
type SetupKeyRequest struct { // AutoGroups Setup key groups to auto-assign to peers registered with this key AutoGroups []string `json:"auto_groups"` // ExpiresIn Expiration time in seconds ExpiresIn int `json:"expires_in"` // Name Setup Key name Name string `json:"name"` // Revoked Setup key revocation status Revoked bool `json:"revoked"` // Type Setup key type, one-off for single time usage and reusable Type string `json:"type"` }
SetupKeyRequest defines model for SetupKeyRequest.
type User ¶
type User struct { // AutoGroups Groups to auto-assign to peers registered by this user AutoGroups []string `json:"auto_groups"` // Email User's email address Email string `json:"email"` // Id User ID Id string `json:"id"` // Name User's name from idp provider Name string `json:"name"` // Role User's NetBird account role Role string `json:"role"` // Status User's status Status UserStatus `json:"status"` }
User defines model for User.
type UserCreateRequest ¶ added in v0.9.8
type UserCreateRequest struct { // AutoGroups Groups to auto-assign to peers registered by this user AutoGroups []string `json:"auto_groups"` // Email User's Email to send invite to Email string `json:"email"` // Name User's full name Name *string `json:"name,omitempty"` // Role User's NetBird account role Role string `json:"role"` }
UserCreateRequest defines model for UserCreateRequest.
type UserRequest ¶ added in v0.9.4
type UserRequest struct { // AutoGroups Groups to auto-assign to peers registered by this user AutoGroups []string `json:"auto_groups"` // Role User's NetBird account role Role string `json:"role"` }
UserRequest defines model for UserRequest.
type UserStatus ¶ added in v0.9.8
type UserStatus string
UserStatus User's status
const ( UserStatusActive UserStatus = "active" UserStatusDisabled UserStatus = "disabled" UserStatusInvited UserStatus = "invited" )
Defines values for UserStatus.