Documentation
¶
Index ¶
- type AuthPayload
- type BowtiePolicy
- type BowtiePolicySource
- type BowtieResource
- type BowtieResourceGroup
- type BowtieResourceLocation
- type BowtieResourceLocationTagged
- type BowtieResourceLocationUntagged
- type BowtieResourcePortCollection
- type BowtieResourcePorts
- type BowtieUser
- type Client
- func (c *Client) AddUserToGroup(groupID string, userIDs []string) (*ModifyUserGroupResponse, error)
- func (c *Client) CreateSite(id string, name string) error
- func (c *Client) DeleteDNS(id string) error
- func (c *Client) DeleteDNSBlockList(id string) error
- func (c *Client) DeleteDevice(id string) error
- func (c *Client) DeleteGroup(groupID string) error
- func (c *Client) DeletePolicy(id string) error
- func (c *Client) DeleteResource(id string) error
- func (c *Client) DeleteResourceGroup(id string) error
- func (c *Client) DeleteSite(siteID string) error
- func (c *Client) DeleteSiteRange(siteID, id string) error
- func (c *Client) DeleteUser(ctx context.Context, id string) error
- func (c *Client) DisableUser(ctx context.Context, id string) error
- func (c *Client) FindSiteRange(site *Site, id string) (*RoutableRange, error)
- func (c *Client) GetDNS() (map[string]DNS, error)
- func (c *Client) GetDNSBlockLists() (map[string]DNSBlockList, error)
- func (c *Client) GetGroups() (map[string]Group, error)
- func (c *Client) GetOrganization() (*Organization, error)
- func (c *Client) GetPoliciesAndResources() (*PoliciesEndpointResponse, error)
- func (c *Client) GetPolicy(id string) (BowtiePolicy, error)
- func (c *Client) GetResourceGroups() (map[string]BowtieResourceGroup, error)
- func (c *Client) GetResources() (map[string]BowtieResource, error)
- func (c *Client) GetSites() ([]Site, error)
- func (c *Client) GetUser(id string) (BowtieUser, error)
- func (c *Client) GetUserByEmail(ctx context.Context, email string) (BowtieUser, error)
- func (c *Client) GetUsers() (map[string]BowtieUser, error)
- func (c *Client) ListDevices() (map[string]Device, error)
- func (c *Client) ListGroups() (map[string]Group, error)
- func (c *Client) ListSites() ([]Site, error)
- func (c *Client) ListUsersInGroup(id string) (*Group, error)
- func (c *Client) Login() error
- func (c *Client) RemoveUserFromGroup(groupID string, userIDs []string) (*ModifyUserGroupResponse, error)
- func (c *Client) SetGroupMembership(groupID string, users []string) error
- func (c *Client) UpsertDNS(id, name string, serverAddrs []Server, includeOnlySites []string, ...) error
- func (c *Client) UpsertDNSBlockList(id string, name string, upstream string, override_to_allow string) error
- func (c *Client) UpsertGroup(id, name string) (string, error)
- func (c *Client) UpsertOrganization(name string, domain string) error
- func (c *Client) UpsertResource(id, name, protocol string, location BowtieResourceLocation, ...) (BowtieResource, error)
- func (c *Client) UpsertResourceGroup(id, name string, resources, resource_groups []string) error
- func (c *Client) UpsertSite(id, name string) error
- func (c *Client) UpsertSiteRange(siteID, id, name, description, cidr string, isV4, isV6 bool, ...) error
- func (c *Client) UpsertUser(id, name, email, role string, ...) (string, error)
- func (c *Client) WhoAmI() (*Me, error)
- type Controller
- type DNS
- type DNSBlockList
- type DNSExclude
- type Device
- type DevicePayload
- type Group
- type Me
- type ModifyUserGroupPayload
- type ModifyUserGroupResponse
- type Organization
- type OrganizationPayload
- type PoliciesEndpointResponse
- type RoutableRange
- type Server
- type SetUserGroupMembershipPayload
- type Site
- type SiteUpsertPayload
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthPayload ¶
type BowtiePolicy ¶
type BowtiePolicy struct {
ID string `json:"id"`
}
type BowtiePolicySource ¶
type BowtieResource ¶
type BowtieResource struct {
ID string `json:"id"`
Name string `json:"name"`
Protocol string `json:"protocol"`
Location BowtieResourceLocation `json:"location"`
Ports BowtieResourcePorts `json:"ports"`
}
type BowtieResourceGroup ¶
type BowtieResourceLocation ¶
type BowtieResourceLocation struct {
Untagged *BowtieResourceLocationUntagged
Tagged *BowtieResourceLocationTagged
}
TODO: This can be collapsed down into the tagged-only variant once the old style API is sunset.
func (BowtieResourceLocation) MarshalJSON ¶ added in v0.6.0
func (rl BowtieResourceLocation) MarshalJSON() ([]byte, error)
func (*BowtieResourceLocation) UnmarshalJSON ¶ added in v0.6.0
func (rl *BowtieResourceLocation) UnmarshalJSON(data []byte) error
type BowtieResourceLocationTagged ¶ added in v0.6.0
type BowtieResourceLocationUntagged ¶ added in v0.6.0
type BowtieResourcePortCollection ¶
type BowtieResourcePortCollection struct {
Ports []int64 `json:"ports,omitempty"`
}
type BowtieResourcePorts ¶
type BowtieResourcePorts struct {
Range []int64 `json:"range,omitempty"`
Collection *BowtieResourcePortCollection `json:"collection,omitempty"`
}
type BowtieUser ¶
type BowtieUser struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
AuthzDevices *bool `json:"authz_devices,omitempty"`
AuthzPolicies *bool `json:"authz_policies,omitempty"`
AuthzControlPlane *bool `json:"authz_control_plane,omitempty"`
AuthzUsers *bool `json:"authz_users,omitempty"`
Status string `json:"status,omitempty"`
Role string `json:"role,omitempty"`
}
type Client ¶
type Client struct {
HTTPClient *http.Client
Tagged_locations bool
// contains filtered or unexported fields
}
func (*Client) AddUserToGroup ¶
func (c *Client) AddUserToGroup(groupID string, userIDs []string) (*ModifyUserGroupResponse, error)
func (*Client) DeleteDNSBlockList ¶ added in v0.4.0
func (*Client) DeleteDevice ¶
func (*Client) DeleteGroup ¶
func (*Client) DeletePolicy ¶
func (*Client) DeleteResource ¶
func (*Client) DeleteResourceGroup ¶
func (*Client) DeleteSite ¶
func (*Client) DeleteSiteRange ¶
func (*Client) FindSiteRange ¶ added in v0.5.3
func (c *Client) FindSiteRange(site *Site, id string) (*RoutableRange, error)
func (*Client) GetDNSBlockLists ¶ added in v0.4.0
func (c *Client) GetDNSBlockLists() (map[string]DNSBlockList, error)
func (*Client) GetOrganization ¶
func (c *Client) GetOrganization() (*Organization, error)
func (*Client) GetPoliciesAndResources ¶
func (c *Client) GetPoliciesAndResources() (*PoliciesEndpointResponse, error)
func (*Client) GetResourceGroups ¶ added in v0.5.3
func (c *Client) GetResourceGroups() (map[string]BowtieResourceGroup, error)
func (*Client) GetResources ¶ added in v0.5.3
func (c *Client) GetResources() (map[string]BowtieResource, error)
func (*Client) GetUserByEmail ¶
func (*Client) RemoveUserFromGroup ¶
func (c *Client) RemoveUserFromGroup(groupID string, userIDs []string) (*ModifyUserGroupResponse, error)
func (*Client) SetGroupMembership ¶
func (*Client) UpsertDNSBlockList ¶ added in v0.4.0
func (*Client) UpsertOrganization ¶ added in v0.5.0
func (*Client) UpsertResource ¶
func (c *Client) UpsertResource(id, name, protocol string, location BowtieResourceLocation, portRange, portCollection []int64) (BowtieResource, error)
func (*Client) UpsertResourceGroup ¶
func (*Client) UpsertSite ¶
func (*Client) UpsertSiteRange ¶
func (*Client) UpsertUser ¶ added in v0.3.0
type Controller ¶
type Controller struct {
ID string `json:"id"`
SiteID string `json:"site_id"`
PublicAddress string `json:"public_address"`
SyncAddress string `json:"sync_address"`
SyncState string `json:"sync_state"`
Status string `json:"status"`
Features []string `json:"features"`
WireguardPort int `json:"wireguard_port"`
PublicKey string `json:"public_key"`
HTTPSEndpoint string `json:"https_endpoint"`
PersistentKeepalive int `json:"persistent_keepalive"`
DeviceID string `json:"device_id"`
IPV6 string `json:"ipv6"`
}
type DNS ¶
type DNS struct {
ID string `json:"id"`
Name string `json:"name"`
IsDNS64 bool `json:"is_dns64"`
Servers map[string]Server `json:"servers"`
IncludeOnlySites []string `json:"include_only_sites"`
IsCounted bool `json:"is_counted"`
IsLog bool `json:"is_log"`
IsDropA bool `json:"is_drop_a"`
IsDropAll bool `json:"is_drop_all"`
IsSearchDomain bool `json:"is_search_domain"`
DNS64Exclude map[string]DNSExclude `json:"dns64_exclude"`
}
type DNSBlockList ¶ added in v0.4.0
type DNSExclude ¶
type Device ¶
type Device struct {
ID string `json:"id"`
Name string `json:"name"`
IPV6 string `json:"ipv6"`
PublicKey string `json:"public_key"`
Serial string `json:"serial"`
State string `json:"state"`
ControllerID string `json:"controller_id"`
OwnedByOrg string `json:"owned_by_org"`
AssignedToUser string `json:"assigned_to_user"`
DeviceType string `json:"device_type"`
DeviceOS string `json:"device_os"`
LastSeen string `json:"last_seen"`
LastSeenVersion string `json:"last_seen_version"`
}
type DevicePayload ¶
type ModifyUserGroupPayload ¶
type ModifyUserGroupResponse ¶
type Organization ¶
type OrganizationPayload ¶ added in v0.5.0
type PoliciesEndpointResponse ¶
type PoliciesEndpointResponse struct {
Policies map[string]BowtiePolicy `json:"policies"`
ResourceGroups map[string]BowtieResourceGroup `json:"resource_groups"`
Resources map[string]BowtieResource `json:"resources"`
}
type RoutableRange ¶
type Site ¶
type Site struct {
ID string `json:"id"`
Name string `json:"name"`
RoutableRangesV4 []RoutableRange `json:"routeable_ranges_v4,omitempty"`
RouteRangesV6 []RoutableRange `json:"routeable_ranges_v6,omitempty"`
Controllers []Controller `json:"controllers,omitempty"`
}
type SiteUpsertPayload ¶
Click to show internal directories.
Click to hide internal directories.