model

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FallbackMethodAuto   = "AUTO"
	FallbackMethodStrict = "STRICT"
)
View Source
const (
	GroupTypeManual = "MANUAL"
	GroupTypeSynced = "SYNCED"
	GroupTypeSystem = "SYSTEM"
)
View Source
const (
	LocationAWS         = "AWS"
	LocationAzure       = "AZURE"
	LocationGoogleCloud = "GOOGLE_CLOUD"
	LocationOnPremise   = "ON_PREMISE"
	LocationOther       = "OTHER"

	NetworkTypeRegular = "REGULAR"
	NetworkTypeExit    = "EXIT"
)
View Source
const (
	PolicyRestricted = "RESTRICTED"
	PolicyAllowAll   = "ALLOW_ALL"
	PolicyDenyAll    = "DENY_ALL"

	ApprovalModeAutomatic = "AUTOMATIC"
	ApprovalModeManual    = "MANUAL"
)
View Source
const (
	StatusActive  = "ACTIVE"
	StatusRevoked = "REVOKED"
)
View Source
const (
	UserRoleAdmin   = "ADMIN"
	UserRoleDevops  = "DEVOPS"
	UserRoleSupport = "SUPPORT"
	UserRoleMember  = "MEMBER"

	UserStateActive   = "ACTIVE"
	UserStatePending  = "PENDING"
	UserStateDisabled = "DISABLED"

	UserTypeManual = "MANUAL"
	UserTypeSynced = "SYNCED"
)

Variables

View Source
var ErrInvalidPortRangeLen = errors.New("port range expects 2 values")
View Source
var FallbackMethods = []string{FallbackMethodAuto, FallbackMethodStrict} //nolint

Functions

func ErrInvalidPortRange

func ErrInvalidPortRange(portRange string, err error) error

Types

type AccessGroup

type AccessGroup struct {
	GroupID            string
	SecurityPolicyID   *string
	UsageBasedDuration *int64
	ApprovalMode       *string
}

func (AccessGroup) Equals added in v3.0.2

func (g AccessGroup) Equals(another AccessGroup) bool

type Connector

type Connector struct {
	ID                   string
	Name                 string
	NetworkID            string
	StatusUpdatesEnabled *bool
	State                string
	Version              string
	Hostname             string
	PublicIP             string
	PrivateIPs           []string
}

func (Connector) GetID

func (c Connector) GetID() string

func (Connector) GetName

func (c Connector) GetName() string

func (Connector) ToTerraform

func (c Connector) ToTerraform() interface{}

type ConnectorTokens

type ConnectorTokens struct {
	AccessToken  string
	RefreshToken string
}

type ContentCategory added in v3.0.11

type ContentCategory struct {
	BlockGambling               bool
	BlockDating                 bool
	BlockAdultContent           bool
	BlockSocialMedia            bool
	BlockGames                  bool
	BlockStreaming              bool
	BlockPiracy                 bool
	EnableYoutubeRestrictedMode bool
	EnableSafeSearch            bool
}

type DNSFilteringProfile added in v3.0.11

type DNSFilteringProfile struct {
	ID                 string
	Name               string
	AllowedDomains     []string
	DeniedDomains      []string
	Groups             []string
	FallbackMethod     string
	Priority           float64
	PrivacyCategories  *PrivacyCategories
	SecurityCategories *SecurityCategory
	ContentCategories  *ContentCategory
}

func (DNSFilteringProfile) GetID added in v3.0.11

func (p DNSFilteringProfile) GetID() string

func (DNSFilteringProfile) GetName added in v3.0.11

func (p DNSFilteringProfile) GetName() string

type Group

type Group struct {
	ID               string
	Name             string
	Type             string
	IsActive         bool
	Users            []string
	IsAuthoritative  bool
	SecurityPolicyID string
}

func (Group) GetID

func (g Group) GetID() string

func (Group) GetName

func (g Group) GetName() string

func (Group) Match added in v3.0.18

func (g Group) Match(filter ResourceFilter) bool

func (Group) ToTerraform

func (g Group) ToTerraform() interface{}

type GroupsFilter

type GroupsFilter struct {
	Name       *string
	NameFilter string
	Types      []string
	IsActive   *bool
}

func (*GroupsFilter) GetFilterBy added in v3.0.18

func (f *GroupsFilter) GetFilterBy() string

func (*GroupsFilter) GetIsActive added in v3.0.18

func (f *GroupsFilter) GetIsActive() *bool

func (*GroupsFilter) GetName

func (f *GroupsFilter) GetName() string

func (*GroupsFilter) GetTags added in v3.1.0

func (f *GroupsFilter) GetTags() map[string]string

func (*GroupsFilter) GetTypes added in v3.0.18

func (f *GroupsFilter) GetTypes() []string

func (*GroupsFilter) HasName

func (f *GroupsFilter) HasName() bool

func (*GroupsFilter) HasNotSupportedFilters added in v3.0.18

func (f *GroupsFilter) HasNotSupportedFilters() bool

func (*GroupsFilter) IsNil added in v3.0.18

func (f *GroupsFilter) IsNil() bool

type PortNotInRangeError

type PortNotInRangeError struct {
	Port int
}

func NewPortNotInRangeError

func NewPortNotInRangeError(port int) *PortNotInRangeError

func (*PortNotInRangeError) Error

func (e *PortNotInRangeError) Error() string

type PortRange

type PortRange struct {
	Start int
	End   int
}

func NewPortRange

func NewPortRange(str string) (*PortRange, error)

func (PortRange) String

func (p PortRange) String() string

type PortRangeNotRisingSequenceError

type PortRangeNotRisingSequenceError struct {
	Start int
	End   int
}

func NewPortRangeNotRisingSequenceError

func NewPortRangeNotRisingSequenceError(start, end int) *PortRangeNotRisingSequenceError

func (*PortRangeNotRisingSequenceError) Error

type PrivacyCategories added in v3.0.11

type PrivacyCategories struct {
	BlockAffiliate         bool
	BlockDisguisedTrackers bool
	BlockAdsAndTrackers    bool
}

type Protocol

type Protocol struct {
	Ports  []*PortRange
	Policy string
}

func DefaultProtocol

func DefaultProtocol() *Protocol

func NewProtocol

func NewProtocol(policy string, ports []*PortRange) *Protocol

func (*Protocol) PortsToString

func (p *Protocol) PortsToString() []string

func (*Protocol) ToTerraform

func (p *Protocol) ToTerraform() []interface{}

type Protocols

type Protocols struct {
	UDP       *Protocol
	TCP       *Protocol
	AllowIcmp bool
}

func DefaultProtocols

func DefaultProtocols() *Protocols

func (*Protocols) ToTerraform

func (p *Protocols) ToTerraform() []interface{}

type RemoteNetwork

type RemoteNetwork struct {
	ID       string
	Name     string
	Location string
	Type     string
}

func (RemoteNetwork) GetID

func (n RemoteNetwork) GetID() string

func (RemoteNetwork) GetName

func (n RemoteNetwork) GetName() string

func (RemoteNetwork) ToTerraform

func (n RemoteNetwork) ToTerraform() interface{}

type Resource

type Resource struct {
	ID                             string
	RemoteNetworkID                string
	Address                        string
	Name                           string
	Protocols                      *Protocols
	IsActive                       bool
	GroupsAccess                   []AccessGroup
	ServiceAccounts                []string
	IsAuthoritative                bool
	IsVisible                      *bool
	IsBrowserShortcutEnabled       *bool
	Alias                          *string
	SecurityPolicyID               *string
	ApprovalMode                   string
	Tags                           map[string]string
	UsageBasedAutolockDurationDays *int64
}

func (Resource) AccessToTerraform

func (r Resource) AccessToTerraform() []interface{}

func (Resource) GetID

func (r Resource) GetID() string

func (Resource) GetName

func (r Resource) GetName() string

func (Resource) Match added in v3.0.18

func (r Resource) Match(filter ResourceFilter) bool

func (Resource) ToTerraform

func (r Resource) ToTerraform() interface{}

type ResourceFilter added in v3.0.18

type ResourceFilter interface {
	GetName() string
	IsNil() bool
	HasNotSupportedFilters() bool
	GetFilterBy() string
	GetTypes() []string
	GetIsActive() *bool
	GetTags() map[string]string
}

type ResourcesFilter added in v3.1.0

type ResourcesFilter struct {
	Name       *string
	NameFilter string
	Tags       map[string]string
}

func (*ResourcesFilter) GetFilterBy added in v3.1.0

func (f *ResourcesFilter) GetFilterBy() string

func (*ResourcesFilter) GetIsActive added in v3.1.0

func (f *ResourcesFilter) GetIsActive() *bool

func (*ResourcesFilter) GetName added in v3.1.0

func (f *ResourcesFilter) GetName() string

func (*ResourcesFilter) GetTags added in v3.1.0

func (f *ResourcesFilter) GetTags() map[string]string

func (*ResourcesFilter) GetTypes added in v3.1.0

func (f *ResourcesFilter) GetTypes() []string

func (*ResourcesFilter) HasName added in v3.1.0

func (f *ResourcesFilter) HasName() bool

func (*ResourcesFilter) HasNotSupportedFilters added in v3.1.0

func (f *ResourcesFilter) HasNotSupportedFilters() bool

func (*ResourcesFilter) IsNil added in v3.1.0

func (f *ResourcesFilter) IsNil() bool

type SecurityCategory added in v3.0.11

type SecurityCategory struct {
	EnableThreatIntelligenceFeeds   bool
	EnableGoogleSafeBrowsing        bool
	BlockCryptojacking              bool
	BlockIdnHomographs              bool
	BlockTyposquatting              bool
	BlockDNSRebinding               bool
	BlockNewlyRegisteredDomains     bool
	BlockDomainGenerationAlgorithms bool
	BlockParkedDomains              bool
}

type SecurityPolicy

type SecurityPolicy struct {
	ID   string
	Name string
}

func (SecurityPolicy) ToTerraform

func (s SecurityPolicy) ToTerraform() interface{}

type ServiceAccount

type ServiceAccount struct {
	ID        string
	Name      string
	Resources []string
	Keys      []string
}

func (ServiceAccount) GetID

func (s ServiceAccount) GetID() string

func (ServiceAccount) GetName

func (s ServiceAccount) GetName() string

func (ServiceAccount) ToTerraform

func (s ServiceAccount) ToTerraform() interface{}

type ServiceKey

type ServiceKey struct {
	ID             string
	Name           string
	Status         string
	Service        string
	ExpirationTime int
	Token          string
}

func (ServiceKey) GetID

func (s ServiceKey) GetID() string

func (ServiceKey) GetName

func (s ServiceKey) GetName() string

func (ServiceKey) IsActive

func (s ServiceKey) IsActive() bool

type User

type User struct {
	ID        string
	FirstName string
	LastName  string
	Email     string
	Role      string
	Type      string
	IsActive  bool
}

func (User) GetID

func (u User) GetID() string

func (User) GetName

func (u User) GetName() string

func (User) State

func (u User) State() string

func (User) ToTerraform

func (u User) ToTerraform() interface{}

type UserUpdate

type UserUpdate struct {
	ID        string
	FirstName *string
	LastName  *string
	Role      *string
	IsActive  *bool
}

func (UserUpdate) State

func (u UserUpdate) State() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL