migration_20231031_0000

package
v0.0.0-...-f9f7919 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        uuid.UUID `gorm:"type:uuid;primary_key;"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index" `
}

type Device

type Device struct {
	Base
	OwnerID                  uuid.UUID `gorm:"index"`
	VpcID                    uuid.UUID `gorm:"index"`
	OrganizationID           uuid.UUID `gorm:"index"`
	PublicKey                string
	AllowedIPs               pq.StringArray `gorm:"type:text[]" `
	IPv4TunnelIPs            []TunnelIP     `gorm:"type:JSONB; serializer:json"`
	IPv6TunnelIPs            []TunnelIP     `gorm:"type:JSONB; serializer:json"`
	AdvertiseCidrs           pq.StringArray `gorm:"type:text[]" `
	Relay                    bool
	EndpointLocalAddressIPv4 string
	SymmetricNat             bool
	Hostname                 string `gorm:"index"`
	Os                       string
	Endpoints                []Endpoint `gorm:"type:JSONB; serializer:json"`
	Revision                 uint64     `gorm:"type:bigserial;index:"`
	SecurityGroupId          uuid.UUID
	Online                   bool
	OnlineAt                 *time.Time
	RegKeyID                 uuid.UUID
	BearerToken              string `gorm:"index"`
}

type DeviceMetadata

type DeviceMetadata struct {
	DeviceID  uuid.UUID      `gorm:"type:uuid;primary_key"`
	Key       string         `gorm:"primary_key"`
	Value     interface{}    `gorm:"type:JSONB; serializer:json"`
	Revision  uint64         `gorm:"type:bigserial;index:"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Endpoint

type Endpoint struct {
	Source  string
	Address string
}

type Invitation

type Invitation struct {
	Base
	UserID         uuid.UUID `gorm:"index"`
	OrganizationID uuid.UUID `gorm:"index"`
	Expiry         time.Time
}

type Organization

type Organization struct {
	Base
	OwnerID         uuid.UUID `gorm:"index"`
	Name            string
	Description     string
	SecurityGroupId uuid.UUID

	Users       []*User `gorm:"many2many:user_organizations;"`
	Invitations []*Invitation
}

type RegKey

type RegKey struct {
	Base
	OwnerID        uuid.UUID `gorm:"index"`
	VpcID          uuid.UUID `gorm:"index"`
	OrganizationID uuid.UUID `gorm:"index"` // OrganizationID is denormalized from the VPC record for performance
	BearerToken    string    `gorm:"index"`
	Description    string
	DeviceId       *uuid.UUID
	Expiration     *time.Time
}

type SecurityGroup

type SecurityGroup struct {
	Base
	GroupName        string
	GroupDescription string
	OrganizationId   uuid.UUID      `gorm:"index"`
	InboundRules     []SecurityRule `gorm:"type:JSONB; serializer:json"`
	OutboundRules    []SecurityRule `gorm:"type:JSONB; serializer:json"`
	Revision         uint64         `gorm:"type:bigserial;index:"`
}

type SecurityRule

type SecurityRule struct {
	IpProtocol string
	FromPort   int64
	ToPort     int64
	IpRanges   []string
}

type TunnelIP

type TunnelIP struct {
	Address string
	CIDR    string
}

type User

type User struct {
	Base
	Organizations   []*Organization `gorm:"many2many:user_organizations" `
	UserName        string          `gorm:"index"`
	IdpID           string
	Invitations     []*Invitation
	SecurityGroupId uuid.UUID
}

type VPC

type VPC struct {
	Base
	OrganizationID uuid.UUID `gorm:"index"`
	Description    string
	PrivateCidr    bool
	Ipv4Cidr       string
	Ipv6Cidr       string
}

Jump to

Keyboard shortcuts

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