Documentation
¶
Index ¶
- Constants
- Variables
- func ListModels() []interface{}
- type Action
- type AddrPort
- type Attribute
- type AuthType
- type Egress
- func (e *Egress) Count(ctx context.Context) (int, error)
- func (e *Egress) Create(ctx context.Context) error
- func (e *Egress) Delete(ctx context.Context, options ...dbtypes.Option) error
- func (e *Egress) DoesEgressRouteExists(ctx context.Context) error
- func (e *Egress) Get(ctx context.Context) error
- func (e *Egress) ListAll(ctx context.Context) (egs []Egress, err error)
- func (e *Egress) ListByNetwork(ctx context.Context) (egs []Egress, err error)
- func (e *Egress) ResetDomain(ctx context.Context) error
- func (e *Egress) ResetMode(ctx context.Context) error
- func (e *Egress) ResetRange(ctx context.Context) error
- func (e *Egress) ResetVirtualRange(ctx context.Context) error
- func (e *Egress) Table() string
- func (e *Egress) Update(ctx context.Context) error
- func (e *Egress) UpdateEgressStatus(ctx context.Context) error
- func (e *Egress) UpdateNatStatus(ctx context.Context) error
- type EgressNATMode
- type Event
- func (a *Event) Create(ctx context.Context) error
- func (a *Event) DeleteOldEvents(ctx context.Context, retentionDays int) error
- func (a *Event) Get(ctx context.Context) error
- func (a *Event) List(ctx context.Context, from, to time.Time) (ats []Event, err error)
- func (a *Event) ListByNetwork(ctx context.Context, from, to time.Time) (ats []Event, err error)
- func (a *Event) ListByUser(ctx context.Context, from, to time.Time) (ats []Event, err error)
- func (a *Event) ListByUserAndNetwork(ctx context.Context, from, to time.Time) (ats []Event, err error)
- func (a *Event) Update(ctx context.Context) error
- type Host
- func (h *Host) Count(ctx context.Context, options ...dbtypes.Option) (int, error)
- func (h *Host) Create(ctx context.Context) error
- func (h *Host) Delete(ctx context.Context) error
- func (h *Host) DeleteAll(ctx context.Context) error
- func (h *Host) Get(ctx context.Context) error
- func (h *Host) ListAll(ctx context.Context, options ...dbtypes.Option) ([]Host, error)
- func (h *Host) TableName() string
- func (h *Host) Upsert(ctx context.Context) error
- type Iface
- type Integration
- type JITGrant
- func (g *JITGrant) Create(ctx context.Context) error
- func (g *JITGrant) Delete(ctx context.Context) error
- func (g *JITGrant) Get(ctx context.Context) error
- func (g *JITGrant) GetActiveByUserAndNetwork(ctx context.Context) (*JITGrant, error)
- func (g *JITGrant) GetByRequestID(ctx context.Context) (*JITGrant, error)
- func (g *JITGrant) ListActiveByNetwork(ctx context.Context) ([]JITGrant, error)
- func (g *JITGrant) ListByUserAndNetwork(ctx context.Context) ([]JITGrant, error)
- func (g *JITGrant) ListExpired(ctx context.Context) ([]JITGrant, error)
- func (g *JITGrant) Table() string
- type JITRequest
- func (r *JITRequest) CountByNetwork(ctx context.Context) (int64, error)
- func (r *JITRequest) CountByStatusAndNetwork(ctx context.Context, status string) (int64, error)
- func (r *JITRequest) Create(ctx context.Context) error
- func (r *JITRequest) Delete(ctx context.Context) error
- func (r *JITRequest) Get(ctx context.Context) error
- func (r *JITRequest) ListByNetwork(ctx context.Context) ([]JITRequest, error)
- func (r *JITRequest) ListByStatusAndNetwork(ctx context.Context, status string) ([]JITRequest, error)
- func (r *JITRequest) ListByUserAndNetwork(ctx context.Context) ([]JITRequest, error)
- func (r *JITRequest) ListPendingByNetwork(ctx context.Context) ([]JITRequest, error)
- func (r *JITRequest) Table() string
- func (r *JITRequest) Update(ctx context.Context) error
- type Job
- type Nameserver
- func (ns *Nameserver) Create(ctx context.Context) error
- func (ns *Nameserver) Delete(ctx context.Context, options ...dbtypes.Option) error
- func (ns *Nameserver) Get(ctx context.Context) error
- func (ns *Nameserver) ListAll(ctx context.Context) (dnsli []Nameserver, err error)
- func (ns *Nameserver) ListByNetwork(ctx context.Context) (dnsli []Nameserver, err error)
- func (ns *Nameserver) Update(ctx context.Context) error
- func (ns *Nameserver) UpdateFallback(ctx context.Context) error
- func (ns *Nameserver) UpdateMatchAll(ctx context.Context) error
- func (ns *Nameserver) UpdateStatus(ctx context.Context) error
- type NameserverDomain
- type Network
- func (n *Network) Count(ctx context.Context) (int, error)
- func (n *Network) Create(ctx context.Context) error
- func (n *Network) Delete(ctx context.Context) error
- func (n *Network) DeleteAll(ctx context.Context) error
- func (n *Network) Get(ctx context.Context) error
- func (n *Network) ListAll(ctx context.Context) ([]Network, error)
- func (n *Network) TableName() string
- func (n *Network) Update(ctx context.Context) error
- func (n *Network) UpdateNodesUpdatedAt(ctx context.Context) error
- type NetworkID
- type NetworkRoles
- type Node
- func (n *Node) AssignGateway(ctx context.Context) error
- func (n *Node) AssignTag(ctx context.Context, tag string, options ...dbtypes.Option) error
- func (n *Node) Count(ctx context.Context, options ...dbtypes.Option) (int, error)
- func (n *Node) Create(ctx context.Context) error
- func (n *Node) Delete(ctx context.Context) error
- func (n *Node) DeleteAll(ctx context.Context) error
- func (n *Node) DeleteViolations(ctx context.Context) error
- func (n *Node) Exists(ctx context.Context) (bool, error)
- func (n *Node) Get(ctx context.Context, options ...dbtypes.Option) error
- func (n *Node) GetByHostAndNetwork(ctx context.Context) error
- func (n *Node) GetByNetworkAndAddress(ctx context.Context) error
- func (n *Node) GetByNetworkAndAddress6(ctx context.Context) error
- func (n *Node) ListAll(ctx context.Context, options ...dbtypes.Option) ([]Node, error)
- func (n *Node) ListByIDs(ctx context.Context, ids []string, options ...dbtypes.Option) ([]Node, error)
- func (n *Node) ListViolations(ctx context.Context) ([]PostureCheckViolation, error)
- func (n *Node) MarkForDeletion(ctx context.Context) error
- func (n *Node) MarkStaleOffline(ctx context.Context, threshold time.Time) (int64, error)
- func (n *Node) ResetAutoAssignGateway(ctx context.Context) error
- func (n *Node) ResetAutoRelayedPeers(ctx context.Context) error
- func (n *Node) ResetGateway(ctx context.Context) error
- func (n *Node) SetAutoAssignGateway(ctx context.Context) error
- func (n *Node) SetInternetGateway(ctx context.Context) error
- func (n *Node) SetRelayedClients(ctx context.Context) error
- func (n *Node) TableName() string
- func (n *Node) UnassignGateway(ctx context.Context) error
- func (n *Node) UnassignTag(ctx context.Context, tag string, options ...dbtypes.Option) error
- func (n *Node) Update(ctx context.Context) error
- func (n *Node) UpdateConnectedStatus(ctx context.Context, options ...dbtypes.Option) error
- func (n *Node) UpdateLastCheckIn(ctx context.Context) error
- func (n *Node) UpdateRelayedClients(ctx context.Context) error
- func (n *Node) UpdateRelayingNode(ctx context.Context) error
- func (n *Node) UpdateStatus(ctx context.Context) error
- func (n *Node) Upsert(ctx context.Context) error
- func (n *Node) UpsertViolations(ctx context.Context, violations []PostureCheckViolation) error
- type NodeStatus
- type Origin
- type PendingHost
- func (p *PendingHost) CheckIfPendingHostExists(ctx context.Context) error
- func (p *PendingHost) Create(ctx context.Context) error
- func (p *PendingHost) Delete(ctx context.Context) error
- func (p *PendingHost) DeleteAllPendingHosts(ctx context.Context) error
- func (p *PendingHost) Get(ctx context.Context) error
- func (p *PendingHost) List(ctx context.Context) (pendingHosts []PendingHost, err error)
- type PendingUser
- func (p *PendingUser) Create(ctx context.Context) error
- func (p *PendingUser) Delete(ctx context.Context) error
- func (p *PendingUser) DeleteAll(ctx context.Context) error
- func (p *PendingUser) Exists(ctx context.Context) (bool, error)
- func (p *PendingUser) Get(ctx context.Context) error
- func (p *PendingUser) ListAll(ctx context.Context, options ...dbtypes.Option) ([]PendingUser, error)
- func (p *PendingUser) TableName() string
- type PostureCheck
- func (p *PostureCheck) Create(ctx context.Context) error
- func (p *PostureCheck) Delete(ctx context.Context, options ...dbtypes.Option) error
- func (p *PostureCheck) Get(ctx context.Context) error
- func (p *PostureCheck) ListAll(ctx context.Context) ([]PostureCheck, error)
- func (p *PostureCheck) ListByNetwork(ctx context.Context) (pcli []PostureCheck, err error)
- func (p *PostureCheck) Update(ctx context.Context) error
- func (p *PostureCheck) UpdateStatus(ctx context.Context) error
- type PostureCheckViolation
- type ResourceAccess
- type RsrcID
- type RsrcPermissionScope
- type RsrcType
- type Severity
- type SubjectType
- type User
- func (u *User) Count(ctx context.Context, options ...dbtypes.Option) (int, error)
- func (u *User) Create(ctx context.Context) error
- func (u *User) Delete(ctx context.Context) error
- func (u *User) Get(ctx context.Context) error
- func (u *User) GetByExternalID(ctx context.Context) error
- func (u *User) GetSuperAdmin(ctx context.Context) error
- func (u *User) ListAll(ctx context.Context, options ...dbtypes.Option) ([]User, error)
- func (u *User) SuperAdminExists(ctx context.Context) (bool, error)
- func (u *User) TableName() string
- func (u *User) Update(ctx context.Context) error
- func (u *User) UpdateAccountStatus(ctx context.Context) error
- func (u *User) UpdateMFA(ctx context.Context) error
- type UserAccessToken
- func (a *UserAccessToken) CountByUser(ctx context.Context) (int, error)
- func (a *UserAccessToken) Create(ctx context.Context) error
- func (a *UserAccessToken) Delete(ctx context.Context) error
- func (a *UserAccessToken) DeleteAllUserTokens(ctx context.Context) error
- func (a *UserAccessToken) Get(ctx context.Context) error
- func (a *UserAccessToken) List(ctx context.Context) (ats []UserAccessToken, err error)
- func (a *UserAccessToken) ListByUser(ctx context.Context) (ats []UserAccessToken)
- func (a *UserAccessToken) Update(ctx context.Context) error
- type UserGroup
- func (u *UserGroup) Count(ctx context.Context, options ...dbtypes.Option) (int, error)
- func (u *UserGroup) Create(ctx context.Context) error
- func (u *UserGroup) Delete(ctx context.Context) error
- func (u *UserGroup) Get(ctx context.Context) error
- func (u *UserGroup) GetByName(ctx context.Context) error
- func (u *UserGroup) ListAll(ctx context.Context, options ...dbtypes.Option) ([]UserGroup, error)
- func (u *UserGroup) TableName() string
- func (u *UserGroup) Update(ctx context.Context) error
- func (u *UserGroup) Upsert(ctx context.Context) error
- type UserGroupID
- type UserInvite
- func (u *UserInvite) Create(ctx context.Context) error
- func (u *UserInvite) DeleteAll(ctx context.Context) error
- func (u *UserInvite) DeleteByEmail(ctx context.Context) error
- func (u *UserInvite) GetByEmail(ctx context.Context) error
- func (u *UserInvite) ListAll(ctx context.Context, options ...dbtypes.Option) ([]UserInvite, error)
- func (u *UserInvite) TableName() string
- type UserRole
- func (u *UserRole) Create(ctx context.Context) error
- func (u *UserRole) Delete(ctx context.Context) error
- func (u *UserRole) DeleteNetworkRoles(ctx context.Context) error
- func (u *UserRole) Exists(ctx context.Context) (bool, error)
- func (u *UserRole) Get(ctx context.Context) error
- func (u *UserRole) ListNetworkRoles(ctx context.Context) ([]UserRole, error)
- func (u *UserRole) ListPlatformRoles(ctx context.Context) ([]UserRole, error)
- func (u *UserRole) TableName() string
- func (u *UserRole) Update(ctx context.Context) error
- func (u *UserRole) Upsert(ctx context.Context) error
- type UserRoleID
- type Values
- type WgKey
Constants ¶
const ( // FIREWALL_IPTABLES - indicates that iptables is the firewall in use FIREWALL_IPTABLES = "iptables" // FIREWALL_NFTABLES - indicates nftables is in use (Linux only) FIREWALL_NFTABLES = "nftables" // FIREWALL_NONE - indicates that no supported firewall in use FIREWALL_NONE = "none" )
const ( // NODE_DELETE - delete node action NODE_DELETE = "delete" // NODE_IS_PENDING - node pending status NODE_IS_PENDING = "pending" // NODE_NOOP - node no op action NODE_NOOP = "noop" // NODE_FORCE_UPDATE - indicates a node should pull all changes NODE_FORCE_UPDATE = "force" )
Variables ¶
var (
ErrNetworkIdentifiersNotProvided = errors.New("network identifiers not provided")
)
var (
ErrPendingUserIdentifiersNotProvided = errors.New("pending user identifiers not provided")
)
var (
ErrUserIdentifiersNotProvided = errors.New("user identifiers not provided")
)
var (
ErrUserInviteIdentifiersNotProvided = errors.New("user invite identifiers not provided")
)
var PostureCheckAttrValues = map[Attribute][]string{ ClientLocation: {"any_valid_iso_country_codes"}, ClientVersion: {"any_valid_semantic_version"}, OS: {"linux", "darwin", "windows", "ios", "android"}, OSVersion: {"any_valid_semantic_version"}, OSFamily: {"linux-debian", "linux-redhat", "linux-suse", "linux-arch", "linux-gentoo", "linux-other", "darwin", "windows", "ios", "android"}, KernelVersion: {"any_valid_semantic_version"}, AutoUpdate: {"true", "false"}, }
var PostureCheckAttrValuesMap = map[Attribute]map[string]struct{}{ ClientLocation: { "any_valid_iso_country_codes": {}, }, ClientVersion: { "any_valid_semantic_version": {}, }, OS: { "linux": {}, "darwin": {}, "windows": {}, "ios": {}, "android": {}, }, OSVersion: { "any_valid_semantic_version": {}, }, OSFamily: { "linux-debian": {}, "linux-redhat": {}, "linux-suse": {}, "linux-arch": {}, "linux-gentoo": {}, "linux-other": {}, "darwin": {}, "windows": {}, "ios": {}, "android": {}, }, KernelVersion: { "any_valid_semantic_version": {}, }, AutoUpdate: { "true": {}, "false": {}, }, }
var PostureCheckAttrs = []Attribute{ ClientLocation, ClientVersion, OS, OSVersion, OSFamily, KernelVersion, AutoUpdate, }
var RsrcTypeMap = map[RsrcType]struct{}{ HostRsrc: {}, RelayRsrc: {}, RemoteAccessGwRsrc: {}, ExtClientsRsrc: {}, InetGwRsrc: {}, EgressGwRsrc: {}, NetworkRsrc: {}, EnrollmentKeysRsrc: {}, UserRsrc: {}, AclRsrc: {}, DnsRsrc: {}, FailOverRsrc: {}, }
Functions ¶
Types ¶
type Action ¶ added in v1.5.1
type Action string
const ( Create Action = "CREATE" Update Action = "UPDATE" Delete Action = "DELETE" DeleteAll Action = "DELETE_ALL" Login Action = "LOGIN" LogOut Action = "LOGOUT" Connect Action = "CONNECT" Sync Action = "SYNC" RefreshKey Action = "REFRESH_KEY" RefreshAllKeys Action = "REFRESH_ALL_KEYS" SyncAll Action = "SYNC_ALL" UpgradeAll Action = "UPGRADE_ALL" Disconnect Action = "DISCONNECT" JoinHostToNet Action = "JOIN_HOST_TO_NETWORK" RemoveHostFromNet Action = "REMOVE_HOST_FROM_NETWORK" EnableMFA Action = "ENABLE_MFA" DisableMFA Action = "DISABLE_MFA" EnforceMFA Action = "ENFORCE_MFA" UnenforceMFA Action = "UNENFORCE_MFA" EnableBasicAuth Action = "ENABLE_BASIC_AUTH" DisableBasicAuth Action = "DISABLE_BASIC_AUTH" EnableTelemetry Action = "ENABLE_TELEMETRY" DisableTelemetry Action = "DISABLE_TELEMETRY" UpdateClientSettings Action = "UPDATE_CLIENT_SETTINGS" UpdateAuthenticationSecuritySettings Action = "UPDATE_AUTHENTICATION_SECURITY_SETTINGS" UpdateMonitoringAndDebuggingSettings Action = "UPDATE_MONITORING_AND_DEBUGGING_SETTINGS" UpdateSMTPSettings Action = "UPDATE_EMAIL_SETTINGS" UpdateIDPSettings Action = "UPDATE_IDP_SETTINGS" EnableFlowLogs Action = "ENABLE_FLOW_LOGS" DisableFlowLogs Action = "DISABLE_FLOW_LOGS" GatewayAssign Action = "GATEWAY_ASSIGN" GatewayUnAssign Action = "GATEWAY_UNASSIGN" JitEnable Action = "ENABLE_JIT" JitDisable Action = "DISABLE_JIT" JitRequestCreate Action = "CREATE_JIT_REQUEST" JitRequestApprove Action = "APPROVE_JIT_REQUEST" JitRequestDeny Action = "DENY_JIT_REQUEST" JitGrantRevoke Action = "REVOKE_JIT_GRANT" JitGroupsUpdate Action = "UPDATE_JIT_GROUPS" EnableUser Action = "ENABLE_USER" DisableUser Action = "DISABLE_USER" EnableAclPolicy Action = "ENABLE_ACL_POLICY" DisableAclPolicy Action = "DISABLE_ACL_POLICY" )
type AddrPort ¶ added in v1.5.1
func (AddrPort) MarshalJSON ¶ added in v1.5.1
func (*AddrPort) UnmarshalJSON ¶ added in v1.5.1
type Egress ¶
type Egress struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"name" json:"name"`
Network string `gorm:"network" json:"network"`
Description string `gorm:"description" json:"description"`
Nodes datatypes.JSONMap `gorm:"nodes" json:"nodes"`
Tags datatypes.JSONMap `gorm:"tags" json:"tags"`
Range string `gorm:"range" json:"range"`
Mode EgressNATMode `gorm:"mode;default:direct_nat" json:"mode"`
VirtualRange string `gorm:"virtual_range" json:"virtual_range"`
// Domains is the user-configured hostname list (exact or *.suffix).
Domains datatypes.JSONSlice[string] `gorm:"domains" json:"domains"`
// DomainAnsByDomain maps each configured domain to its resolved CIDRs.
DomainAnsByDomain datatypes.JSONMap `gorm:"domain_ans_by_domain" json:"domain_ans_by_domain"`
Nat bool `gorm:"nat" json:"nat"`
//IsInetGw bool `gorm:"is_inet_gw" json:"is_internet_gateway"`
// PresetID is the catalog id when this egress was created from a preset (empty if custom).
PresetID string `gorm:"preset_id" json:"preset_id"`
Status bool `gorm:"status" json:"status"`
CreatedBy string `gorm:"created_by" json:"created_by"`
CreatedAt time.Time `gorm:"created_at" json:"created_at"`
UpdatedAt time.Time `gorm:"updated_at" json:"updated_at"`
}
func (*Egress) DoesEgressRouteExists ¶ added in v1.1.0
func (*Egress) ListByNetwork ¶
func (*Egress) ResetDomain ¶ added in v1.2.0
func (*Egress) ResetVirtualRange ¶ added in v1.5.0
type EgressNATMode ¶ added in v1.5.1
type EgressNATMode string
const ( DisabledNAT EgressNATMode = "disabled" VirtualNAT EgressNATMode = "virtual_nat" DirectNAT EgressNATMode = "direct_nat" )
type Event ¶
type Event struct {
ID string `gorm:"primaryKey" json:"id"`
Action Action `gorm:"action" json:"action"`
Source datatypes.JSON `gorm:"source" json:"source"`
Origin Origin `gorm:"origin" json:"origin"`
Target datatypes.JSON `gorm:"target" json:"target"`
NetworkID NetworkID `gorm:"network_id" json:"network_id"`
TriggeredBy string `gorm:"triggered_by" json:"triggered_by"`
Diff datatypes.JSON `gorm:"diff" json:"diff"`
TimeStamp time.Time `gorm:"time_stamp" json:"time_stamp"`
}
func (*Event) DeleteOldEvents ¶
func (*Event) ListByNetwork ¶
func (*Event) ListByUser ¶
func (*Event) ListByUserAndNetwork ¶
type Host ¶ added in v1.5.1
type Host struct {
ID uuid.UUID `gorm:"primaryKey" json:"id" yaml:"id"`
Verbosity int `json:"verbosity" yaml:"verbosity"`
FirewallInUse string `json:"firewallinuse" yaml:"firewallinuse"`
Version string `json:"version" yaml:"version"`
IPForwarding bool `json:"ipforwarding" yaml:"ipforwarding"`
DaemonInstalled bool `json:"daemoninstalled" yaml:"daemoninstalled"`
AutoUpdate bool `json:"autoupdate" yaml:"autoupdate"`
HostPass string `json:"hostpass" yaml:"hostpass"`
Name string `json:"name" yaml:"name"`
OS string `json:"os" yaml:"os"`
OSFamily string `json:"os_family" yaml:"os_family"`
OSVersion string `json:"os_version" yaml:"os_version"`
KernelVersion string `json:"kernel_version" yaml:"kernel_version"`
Interface string `json:"interface" yaml:"interface"`
Debug bool `json:"debug" yaml:"debug"`
ListenPort int `json:"listenport" yaml:"listenport"`
WgPublicListenPort int `json:"wg_public_listen_port" yaml:"wg_public_listen_port"`
MTU int `json:"mtu" yaml:"mtu"`
PublicKey WgKey `json:"publickey" yaml:"publickey"`
MacAddress net.HardwareAddr `json:"macaddress" yaml:"macaddress"`
TrafficKeyPublic datatypes.JSONSlice[byte] `json:"traffickeypublic" yaml:"traffickeypublic"`
Nodes datatypes.JSONSlice[string] `json:"nodes" yaml:"nodes"`
Interfaces datatypes.JSONSlice[Iface] `json:"interfaces" yaml:"interfaces"`
DefaultInterface string `json:"defaultinterface" yaml:"defaultinterface"`
EndpointIP net.IP `json:"endpointip" yaml:"endpointip"`
EndpointIPv6 net.IP `json:"endpointipv6" yaml:"endpointipv6"`
IsDocker bool `json:"isdocker" yaml:"isdocker"`
IsK8S bool `json:"isk8s" yaml:"isk8s"`
IsStaticPort bool `json:"isstaticport" yaml:"isstaticport"`
IsStatic bool `json:"isstatic" yaml:"isstatic"`
IsDefault bool `json:"isdefault" yaml:"isdefault"`
DNS string `json:"dns_status" yaml:"dns_status"`
NatType string `json:"nat_type,omitempty" yaml:"nat_type,omitempty"`
TurnEndpoint *AddrPort `json:"turn_endpoint,omitempty" yaml:"turn_endpoint,omitempty"`
PersistentKeepalive time.Duration `json:"persistentkeepalive" swaggertype:"primitive,integer" format:"int64" yaml:"persistentkeepalive"`
Location string `json:"location" yaml:"location"` // Format: "lat,lon"
CountryCode string `json:"country_code" yaml:"country_code"`
EnableFlowLogs bool `json:"enable_flow_logs" yaml:"enable_flow_logs"`
CreatedAt time.Time `json:"created_at" yaml:"created_at"`
UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"`
}
type Iface ¶ added in v1.5.1
type Iface struct {
Name string `json:"name"`
Address net.IPNet `json:"address"`
AddressString string `json:"addressString"`
}
Iface struct for local interfaces of a node
type Integration ¶ added in v1.6.0
type Integration struct {
ID string `gorm:"primaryKey;column:id" json:"id"`
Type string `gorm:"not null;column:type" json:"type"`
Config datatypes.JSON `gorm:"not null;column:config" json:"config"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Integration) Delete ¶ added in v1.6.0
func (i *Integration) Delete(ctx context.Context) error
func (*Integration) ListByType ¶ added in v1.6.0
func (i *Integration) ListByType(ctx context.Context) ([]Integration, error)
func (*Integration) TableName ¶ added in v1.6.0
func (i *Integration) TableName() string
type JITGrant ¶ added in v1.5.0
type JITGrant struct {
ID string `gorm:"primaryKey" json:"id"`
NetworkID string `gorm:"network_id" json:"network_id"`
UserID string `gorm:"user_id" json:"user_id"`
RequestID string `gorm:"request_id" json:"request_id"`
GrantedAt time.Time `gorm:"granted_at" json:"granted_at"`
ExpiresAt time.Time `gorm:"expires_at" json:"expires_at"`
}
func (*JITGrant) GetActiveByUserAndNetwork ¶ added in v1.5.0
func (*JITGrant) GetByRequestID ¶ added in v1.5.0
func (*JITGrant) ListActiveByNetwork ¶ added in v1.5.0
func (*JITGrant) ListByUserAndNetwork ¶ added in v1.5.0
func (*JITGrant) ListExpired ¶ added in v1.5.0
type JITRequest ¶ added in v1.5.0
type JITRequest struct {
ID string `gorm:"primaryKey" json:"id"`
NetworkID string `gorm:"network_id" json:"network_id"`
UserID string `gorm:"user_id" json:"user_id"`
UserName string `gorm:"user_name" json:"user_name"`
Reason string `gorm:"reason" json:"reason"`
Status string `gorm:"status" json:"status"` // pending, approved, denied, expired
RevokedAt time.Time `gorm:"revoked_at" json:"revoked_at"`
RequestedAt time.Time `gorm:"requested_at" json:"requested_at"`
ApprovedAt time.Time `gorm:"approved_at" json:"approved_at,omitempty"`
ApprovedBy string `gorm:"approved_by" json:"approved_by,omitempty"`
DurationHours int `gorm:"duration_hours" json:"duration_hours,omitempty"`
ExpiresAt time.Time `gorm:"expires_at" json:"expires_at,omitempty"`
}
func (*JITRequest) CountByNetwork ¶ added in v1.5.0
func (r *JITRequest) CountByNetwork(ctx context.Context) (int64, error)
func (*JITRequest) CountByStatusAndNetwork ¶ added in v1.5.0
func (*JITRequest) ListByNetwork ¶ added in v1.5.0
func (r *JITRequest) ListByNetwork(ctx context.Context) ([]JITRequest, error)
func (*JITRequest) ListByStatusAndNetwork ¶ added in v1.5.0
func (r *JITRequest) ListByStatusAndNetwork(ctx context.Context, status string) ([]JITRequest, error)
func (*JITRequest) ListByUserAndNetwork ¶ added in v1.5.0
func (r *JITRequest) ListByUserAndNetwork(ctx context.Context) ([]JITRequest, error)
func (*JITRequest) ListPendingByNetwork ¶ added in v1.5.0
func (r *JITRequest) ListPendingByNetwork(ctx context.Context) ([]JITRequest, error)
func (*JITRequest) Table ¶ added in v1.5.0
func (r *JITRequest) Table() string
type Job ¶
Job represents a task that netmaker server wants to do.
Ideally, a jobs table should have details about its type, status, who initiated it, etc. But, for now, the table only contains records of jobs that have been done, so that it is easier to prevent a task from being executed again.
type Nameserver ¶ added in v1.1.0
type Nameserver struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"name" json:"name"`
NetworkID string `gorm:"network_id" json:"network_id"`
Description string `gorm:"description" json:"description"`
Default bool `gorm:"column:default" json:"default"`
Fallback bool `gorm:"fallback" json:"fallback"`
Servers datatypes.JSONSlice[string] `gorm:"servers" json:"servers"`
MatchAll bool `gorm:"match_all" json:"match_all"`
Domains datatypes.JSONSlice[NameserverDomain] `gorm:"domains" json:"domains"`
// TODO: deprecate
MatchDomains datatypes.JSONSlice[string] `gorm:"match_domains" json:"match_domains"`
Tags datatypes.JSONMap `gorm:"tags" json:"tags"`
Nodes datatypes.JSONMap `gorm:"nodes" json:"nodes"`
Status bool `gorm:"status" json:"status"`
CreatedBy string `gorm:"created_by" json:"created_by"`
CreatedAt time.Time `gorm:"created_at" json:"created_at"`
UpdatedAt time.Time `gorm:"updated_at" json:"updated_at"`
}
func (*Nameserver) ListAll ¶ added in v1.6.0
func (ns *Nameserver) ListAll(ctx context.Context) (dnsli []Nameserver, err error)
func (*Nameserver) ListByNetwork ¶ added in v1.1.0
func (ns *Nameserver) ListByNetwork(ctx context.Context) (dnsli []Nameserver, err error)
func (*Nameserver) UpdateFallback ¶ added in v1.4.0
func (ns *Nameserver) UpdateFallback(ctx context.Context) error
func (*Nameserver) UpdateMatchAll ¶ added in v1.1.0
func (ns *Nameserver) UpdateMatchAll(ctx context.Context) error
func (*Nameserver) UpdateStatus ¶ added in v1.1.0
func (ns *Nameserver) UpdateStatus(ctx context.Context) error
type NameserverDomain ¶ added in v1.2.0
type Network ¶ added in v1.5.1
type Network struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"unique" json:"netid"`
AddressRange string `json:"addressrange"`
AddressRange6 string `json:"addressrange6"`
// in seconds.
DefaultKeepAlive int `gorm:"default:20" json:"defaultkeepalive"`
DefaultMTU int32 `gorm:"default:1280" json:"defaultmtu"`
AutoJoin bool `json:"auto_join"`
AutoRemove bool `json:"auto_remove"`
AutoRemoveTags datatypes.JSONSlice[string] `json:"auto_remove_tags"`
// in minutes
AutoRemoveThreshold int `json:"auto_remove_threshold"`
JITEnabled bool `json:"jit_enabled"`
JITUserGroupIDs datatypes.JSONSlice[UserGroupID] `json:"jit_user_group_ids"`
VirtualNATPoolIPv4 string `json:"virtual_nat_pool_ipv4"`
VirtualNATSitePrefixLenIPv4 int `json:"virtual_nat_site_prefixlen_ipv4"`
NodesUpdatedAt time.Time `json:"nodes_updated_at"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Network schema.
NOTE: json tags are different from field names to ensure compatibility with the older model.
type NetworkRoles ¶ added in v1.5.1
type NetworkRoles map[NetworkID]map[UserRoleID]struct{}
type Node ¶ added in v1.6.0
type Node struct {
ID string `gorm:"primaryKey" json:"id"`
HostID string `gorm:"not null;index" json:"host_id"`
Host *Host `gorm:"foreignKey:HostID;constraint:OnDelete:CASCADE" json:"host,omitempty"`
NetworkID string `gorm:"not null;index" json:"network_id"`
Network *Network `gorm:"foreignKey:NetworkID;constraint:OnDelete:CASCADE" json:"network,omitempty"`
Address string `json:"address"`
Address6 string `json:"address6"`
Connected bool `json:"connected"`
Action string `json:"action"`
Status NodeStatus `json:"status"`
PendingDelete bool `json:"pending_delete"`
AutoAssignGateway bool `json:"auto_assign_gateway"`
IsGateway bool `json:"is_gateway"`
IsAutoRelay string `json:"is_auto_relay"`
IsInternetGateway bool `json:"is_internet_gateway"`
AdditionalGatewayEndpoints datatypes.JSONSlice[string] `json:"additional_gateway_endpoints"`
RelayedClients datatypes.JSONMap `json:"relayed_clients"`
RelayedIGWClients datatypes.JSONMap `json:"relayed_igw_clients"`
RelayedByNodeID *string `json:"relayed_by_node_id"`
IsIGWClient bool `json:"is_igw_client"`
AutoRelayedPeers datatypes.JSONType[map[string]string] `json:"auto_relayed_peers"`
Tags datatypes.JSONMap `json:"tags"`
PostureCheckSeverity Severity `json:"posture_check_severity"`
PostureCheckLastEvaluationCycleID string `json:"posture_check_last_evaluation_cycle_id"`
PostureCheckLastEvaluatedAt time.Time `json:"posture_check_last_evaluated_at"`
Metadata string `json:"metadata"`
LastCheckIn time.Time `json:"last_check_in"`
ExpirationDateTime time.Time `json:"expiration_date_time"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Node) AssignGateway ¶ added in v1.6.0
func (*Node) DeleteViolations ¶ added in v1.6.0
func (*Node) GetByHostAndNetwork ¶ added in v1.6.0
func (*Node) GetByNetworkAndAddress ¶ added in v1.6.0
func (*Node) GetByNetworkAndAddress6 ¶ added in v1.6.0
func (*Node) ListByIDs ¶ added in v1.6.0
func (n *Node) ListByIDs(ctx context.Context, ids []string, options ...dbtypes.Option) ([]Node, error)
ListByIDs fetches nodes whose IDs are in the given slice using a single `WHERE id IN (?)` query. Returns an empty slice when ids is empty.
func (*Node) ListViolations ¶ added in v1.6.0
func (n *Node) ListViolations(ctx context.Context) ([]PostureCheckViolation, error)
func (*Node) MarkForDeletion ¶ added in v1.6.0
func (*Node) MarkStaleOffline ¶ added in v1.6.0
MarkStaleOffline sets status=offline for every node whose last_check_in is older than the given threshold and which is not already offline, not pending deletion, and not flagged for the delete action. Returns the number of rows updated. Issues exactly one SQL statement.
func (*Node) ResetAutoAssignGateway ¶ added in v1.6.0
func (*Node) ResetAutoRelayedPeers ¶ added in v1.6.0
func (*Node) SetAutoAssignGateway ¶ added in v1.6.0
func (*Node) SetInternetGateway ¶ added in v1.6.0
func (*Node) SetRelayedClients ¶ added in v1.6.0
func (*Node) UnassignGateway ¶ added in v1.6.0
func (*Node) UnassignTag ¶ added in v1.6.0
func (*Node) UpdateConnectedStatus ¶ added in v1.6.0
func (*Node) UpdateLastCheckIn ¶ added in v1.6.0
func (*Node) UpdateRelayedClients ¶ added in v1.6.0
func (*Node) UpdateRelayingNode ¶ added in v1.6.0
func (*Node) UpdateStatus ¶ added in v1.6.0
UpdateStatus updates only the status column for a single node by ID. Lighter than Upsert: no preloads, no full row write, no association handling.
func (*Node) UpsertViolations ¶ added in v1.6.0
func (n *Node) UpsertViolations(ctx context.Context, violations []PostureCheckViolation) error
type NodeStatus ¶ added in v1.6.0
type NodeStatus string
const ( OnlineSt NodeStatus = "online" OfflineSt NodeStatus = "offline" WarningSt NodeStatus = "warning" ErrorSt NodeStatus = "error" UnKnown NodeStatus = "unknown" Disconnected NodeStatus = "disconnected" )
type PendingHost ¶ added in v1.1.0
type PendingHost struct {
ID string `gorm:"id" json:"id"`
HostID string `gorm:"host_id" json:"host_id"`
Hostname string `gorm:"host_name" json:"host_name"`
Network string `gorm:"network" json:"network"`
PublicKey string `gorm:"public_key" json:"public_key"`
EnrollmentKey datatypes.JSON `gorm:"enrollment_key_id" json:"enrollment_key_id"`
OS string `gorm:"os" json:"os"`
Version string `gorm:"version" json:"version"`
Location string `gorm:"location" json:"location"` // Format: "lat,lon"
RequestedAt time.Time `gorm:"requested_at" json:"requested_at"`
}
func (*PendingHost) CheckIfPendingHostExists ¶ added in v1.1.0
func (p *PendingHost) CheckIfPendingHostExists(ctx context.Context) error
func (*PendingHost) Create ¶ added in v1.1.0
func (p *PendingHost) Create(ctx context.Context) error
func (*PendingHost) Delete ¶ added in v1.1.0
func (p *PendingHost) Delete(ctx context.Context) error
func (*PendingHost) DeleteAllPendingHosts ¶ added in v1.1.0
func (p *PendingHost) DeleteAllPendingHosts(ctx context.Context) error
func (*PendingHost) List ¶ added in v1.1.0
func (p *PendingHost) List(ctx context.Context) (pendingHosts []PendingHost, err error)
type PendingUser ¶ added in v1.6.0
type PendingUser struct {
ID string `gorm:"primaryKey" json:"id"`
Username string `gorm:"unique" json:"username"`
ExternalIdentityProviderID string `json:"external_identity_provider_id"`
CreatedAt time.Time `json:"created_at"`
}
func (*PendingUser) Create ¶ added in v1.6.0
func (p *PendingUser) Create(ctx context.Context) error
func (*PendingUser) Delete ¶ added in v1.6.0
func (p *PendingUser) Delete(ctx context.Context) error
func (*PendingUser) DeleteAll ¶ added in v1.6.0
func (p *PendingUser) DeleteAll(ctx context.Context) error
func (*PendingUser) Exists ¶ added in v1.6.0
func (p *PendingUser) Exists(ctx context.Context) (bool, error)
func (*PendingUser) ListAll ¶ added in v1.6.0
func (p *PendingUser) ListAll(ctx context.Context, options ...dbtypes.Option) ([]PendingUser, error)
func (*PendingUser) TableName ¶ added in v1.6.0
func (p *PendingUser) TableName() string
type PostureCheck ¶ added in v1.4.0
type PostureCheck struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"name" json:"name"`
NetworkID NetworkID `gorm:"network_id" json:"network_id"`
Description string `gorm:"description" json:"description"`
Attribute Attribute `gorm:"attribute" json:"attribute"`
Values datatypes.JSONSlice[string] `gorm:"values" json:"values"`
Severity Severity `gorm:"severity" json:"severity"`
Tags datatypes.JSONMap `gorm:"tags" json:"tags"`
UserGroups datatypes.JSONMap `gorm:"user_groups" json:"user_groups"`
Status bool `gorm:"status" json:"status"`
CreatedBy string `gorm:"created_by" json:"created_by"`
CreatedAt time.Time `gorm:"created_at" json:"created_at"`
UpdatedAt time.Time `gorm:"updated_at" json:"updated_at"`
}
func (*PostureCheck) Create ¶ added in v1.4.0
func (p *PostureCheck) Create(ctx context.Context) error
func (*PostureCheck) ListAll ¶ added in v1.5.1
func (p *PostureCheck) ListAll(ctx context.Context) ([]PostureCheck, error)
func (*PostureCheck) ListByNetwork ¶ added in v1.4.0
func (p *PostureCheck) ListByNetwork(ctx context.Context) (pcli []PostureCheck, err error)
func (*PostureCheck) Update ¶ added in v1.4.0
func (p *PostureCheck) Update(ctx context.Context) error
func (*PostureCheck) UpdateStatus ¶ added in v1.4.0
func (p *PostureCheck) UpdateStatus(ctx context.Context) error
type PostureCheckViolation ¶ added in v1.6.0
type PostureCheckViolation struct {
EvaluationCycleID string `gorm:"primaryKey;column:evaluation_cycle_id" json:"evaluation_cycle_id"`
CheckID string `gorm:"primaryKey;column:check_id" json:"check_id"`
NodeID string `gorm:"primaryKey;column:node_id" json:"node_id"`
Name string `json:"name"`
Attribute string `json:"attribute"`
Message string `json:"message"`
Severity Severity `json:"severity"`
EvaluatedAt time.Time `json:"evaluated_at"`
}
func (*PostureCheckViolation) TableName ¶ added in v1.6.0
func (v *PostureCheckViolation) TableName() string
type ResourceAccess ¶ added in v1.5.1
type ResourceAccess map[RsrcType]map[RsrcID]RsrcPermissionScope
type RsrcID ¶ added in v1.5.1
type RsrcID string
const ( AllHostRsrcID RsrcID = "all_host" AllRelayRsrcID RsrcID = "all_relay" AllRemoteAccessGwRsrcID RsrcID = "all_remote_access_gw" AllExtClientsRsrcID RsrcID = "all_extclients" AllInetGwRsrcID RsrcID = "all_inet_gw" AllEgressGwRsrcID RsrcID = "all_egress" AllNetworkRsrcID RsrcID = "all_network" AllEnrollmentKeysRsrcID RsrcID = "all_enrollment_key" AllUserRsrcID RsrcID = "all_user" AllDnsRsrcID RsrcID = "all_dns" AllFailOverRsrcID RsrcID = "all_fail_over" AllAclsRsrcID RsrcID = "all_acl" AllTagsRsrcID RsrcID = "all_tag" AllPostureCheckRsrcID RsrcID = "all_posturecheck" AllNameserverRsrcID RsrcID = "all_nameserver" AllJitAdminRsrcID RsrcID = "all_jit_admin" AllJitUserRsrcID RsrcID = "all_jit_user" AllUserActivityRsrcID RsrcID = "all_user_activity" AllNetworkActivityRsrcID RsrcID = "all_network_activity" AllActivityRsrcID RsrcID = "all_activity" AllTrafficFlowRsrcID RsrcID = "all_traffic_flow" )
type RsrcPermissionScope ¶ added in v1.5.1
type RsrcType ¶ added in v1.5.1
type RsrcType string
const ( HostRsrc RsrcType = "host" RelayRsrc RsrcType = "relay" RemoteAccessGwRsrc RsrcType = "remote_access_gw" GatewayRsrc RsrcType = "gateway" ExtClientsRsrc RsrcType = "extclient" InetGwRsrc RsrcType = "inet_gw" EgressGwRsrc RsrcType = "egress" NetworkRsrc RsrcType = "network" EnrollmentKeysRsrc RsrcType = "enrollment_key" UserRsrc RsrcType = "user" AclRsrc RsrcType = "acl" TagRsrc RsrcType = "tag" DnsRsrc RsrcType = "dns" NameserverRsrc RsrcType = "nameserver" FailOverRsrc RsrcType = "fail_over" MetricRsrc RsrcType = "metric" PostureCheckRsrc RsrcType = "posturecheck" JitAdminRsrc RsrcType = "jit_admin" JitUserRsrc RsrcType = "jit_user" UserActivityRsrc RsrcType = "user_activity" NetworkActivityRsrc RsrcType = "network_activity" ActivityRsrc RsrcType = "activity" TrafficFlow RsrcType = "traffic_flow" )
type SubjectType ¶ added in v1.5.1
type SubjectType string
const ( UserSub SubjectType = "USER" UserAccessTokenSub SubjectType = "USER_ACCESS_TOKEN" DeviceSub SubjectType = "DEVICE" NodeSub SubjectType = "NODE" GatewaySub SubjectType = "GATEWAY" SettingSub SubjectType = "SETTING" AclSub SubjectType = "ACL" TagSub SubjectType = "TAG" UserRoleSub SubjectType = "USER_ROLE" UserGroupSub SubjectType = "USER_GROUP" UserInviteSub SubjectType = "USER_INVITE" PendingUserSub SubjectType = "PENDING_USER" EgressSub SubjectType = "EGRESS" NetworkSub SubjectType = "NETWORK" DashboardSub SubjectType = "DASHBOARD" EnrollmentKeySub SubjectType = "ENROLLMENT_KEY" ClientAppSub SubjectType = "CLIENT-APP" NameserverSub SubjectType = "NAMESERVER" PostureCheckSub SubjectType = "POSTURE_CHECK" JITSub SubjectType = "JIT" )
func (SubjectType) String ¶ added in v1.5.1
func (sub SubjectType) String() string
type User ¶ added in v1.5.1
type User struct {
ID string `gorm:"primaryKey" json:"id"`
Username string `gorm:"unique" json:"username"`
DisplayName string `json:"display_name"`
PlatformRoleID UserRoleID `json:"platform_role_id"`
ExternalIdentityProviderID string `json:"external_identity_provider_id"`
AccountDisabled bool `json:"account_disabled"`
AuthType AuthType `json:"auth_type"`
Password string `json:"password"`
IsMFAEnabled bool `json:"is_mfa_enabled"`
TOTPSecret string `json:"totp_secret"`
// NOTE: json tag is different from field name to ensure compatibility with the older model.
LastLoginAt time.Time `json:"last_login_time"`
// NOTE: json tag is different from field name to ensure compatibility with the older model.
UserGroups datatypes.JSONType[map[UserGroupID]struct{}] `json:"user_group_ids"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*User) GetByExternalID ¶ added in v1.6.0
func (*User) GetSuperAdmin ¶ added in v1.5.1
func (*User) SuperAdminExists ¶ added in v1.5.1
func (*User) UpdateAccountStatus ¶ added in v1.5.1
type UserAccessToken ¶
type UserAccessToken struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `json:"name"`
UserName string `json:"user_name"`
ExpiresAt time.Time `json:"expires_at"`
LastUsed time.Time `json:"last_used"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
}
UserAccessToken - token used to access netmaker
func (*UserAccessToken) CountByUser ¶ added in v1.0.0
func (a *UserAccessToken) CountByUser(ctx context.Context) (int, error)
func (*UserAccessToken) DeleteAllUserTokens ¶
func (a *UserAccessToken) DeleteAllUserTokens(ctx context.Context) error
func (*UserAccessToken) List ¶
func (a *UserAccessToken) List(ctx context.Context) (ats []UserAccessToken, err error)
func (*UserAccessToken) ListByUser ¶
func (a *UserAccessToken) ListByUser(ctx context.Context) (ats []UserAccessToken)
type UserGroup ¶ added in v1.5.1
type UserGroup struct {
ID UserGroupID `gorm:"primaryKey" json:"id"`
Name string `json:"name"`
Default bool `json:"default"`
ExternalIdentityProviderID string `json:"external_identity_provider_id"`
NetworkRoles datatypes.JSONType[NetworkRoles] `json:"network_roles"`
ColorCode string `json:"color_code"`
MetaData string `json:"meta_data"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type UserGroupID ¶ added in v1.5.1
type UserGroupID string
func (UserGroupID) String ¶ added in v1.5.1
func (g UserGroupID) String() string
type UserInvite ¶ added in v1.6.0
type UserInvite struct {
ID string `gorm:"primaryKey" json:"id"`
InviteCode string `gorm:"unique" json:"invite_code"`
InviteURL string `json:"invite_url"`
Email string `json:"email"`
PlatformRoleID string `json:"platform_role_id"`
UserGroups datatypes.JSONType[map[UserGroupID]struct{}] `json:"user_group_ids"`
}
func (*UserInvite) DeleteAll ¶ added in v1.6.0
func (u *UserInvite) DeleteAll(ctx context.Context) error
func (*UserInvite) DeleteByEmail ¶ added in v1.6.0
func (u *UserInvite) DeleteByEmail(ctx context.Context) error
func (*UserInvite) GetByEmail ¶ added in v1.6.0
func (u *UserInvite) GetByEmail(ctx context.Context) error
func (*UserInvite) ListAll ¶ added in v1.6.0
func (u *UserInvite) ListAll(ctx context.Context, options ...dbtypes.Option) ([]UserInvite, error)
func (*UserInvite) TableName ¶ added in v1.6.0
func (u *UserInvite) TableName() string
type UserRole ¶ added in v1.5.1
type UserRole struct {
ID UserRoleID `gorm:"primaryKey" json:"id"`
Name string `json:"name"`
Default bool `json:"default"`
MetaData string `json:"meta_data"`
DenyDashboardAccess bool `json:"deny_dashboard_access"`
FullAccess bool `json:"full_access"`
NetworkID NetworkID `json:"network_id"`
NetworkLevelAccess datatypes.JSONType[ResourceAccess] `json:"network_level_access"`
GlobalLevelAccess datatypes.JSONType[ResourceAccess] `json:"global_level_access"`
}
func (*UserRole) DeleteNetworkRoles ¶ added in v1.5.1
func (*UserRole) ListNetworkRoles ¶ added in v1.5.1
func (*UserRole) ListPlatformRoles ¶ added in v1.5.1
type UserRoleID ¶ added in v1.5.1
type UserRoleID string
const ( SuperAdminRole UserRoleID = "super-admin" AdminRole UserRoleID = "admin" ServiceUser UserRoleID = "service-user" PlatformUser UserRoleID = "platform-user" Auditor UserRoleID = "auditor" NetworkAdmin UserRoleID = "network-admin" NetworkUser UserRoleID = "network-user" )
func (UserRoleID) String ¶ added in v1.5.1
func (r UserRoleID) String() string