model

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupTypeManual = "MANUAL"
	GroupTypeSynced = "SYNCED"
	GroupTypeSystem = "SYSTEM"
)
View Source
const (
	LocationAWS         = "AWS"
	LocationAzure       = "AZURE"
	LocationGoogleCloud = "GOOGLE_CLOUD"
	LocationOnPremise   = "ON_PREMISE"
	LocationOther       = "OTHER"
)
View Source
const (
	PolicyRestricted = "RESTRICTED"
	PolicyAllowAll   = "ALLOW_ALL"
	PolicyDenyAll    = "DENY_ALL"
)
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")

Functions

func ErrInvalidPortRange

func ErrInvalidPortRange(portRange string, err error) error

Types

type Connector

type Connector struct {
	ID                   string
	Name                 string
	NetworkID            string
	StatusUpdatesEnabled *bool
}

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 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) ToTerraform

func (g Group) ToTerraform() interface{}

type GroupsFilter

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

func (*GroupsFilter) GetName

func (f *GroupsFilter) GetName() string

func (*GroupsFilter) HasName

func (f *GroupsFilter) HasName() 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 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
}

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
	Groups                   []string
	ServiceAccounts          []string
	IsAuthoritative          bool
	IsVisible                *bool
	IsBrowserShortcutEnabled *bool
	Alias                    *string
	SecurityPolicyID         *string
}

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) ToTerraform

func (r Resource) ToTerraform() interface{}

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
	SendInvite bool
	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