migration_20231114_0000

package
v0.0.0-...-4f10b81 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 6 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
}

type Organization

type Organization struct {
	Base
	OwnerID     uuid.UUID
	Name        string
	Description string

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

type RegKey

type RegKey struct {
	Base
	OwnerID        uuid.UUID  `json:"owner_id,omitempty"`
	VpcID          uuid.UUID  `json:"vpc_id,omitempty"`
	OrganizationID uuid.UUID  `json:"-"`                      // OrganizationID is denormalized from the VPC record for performance
	BearerToken    string     `json:"bearer_token,omitempty"` // BearerToken is the bearer token the client should use to authenticate the device registration request.
	Description    string     `json:"description,omitempty"`
	DeviceId       *uuid.UUID `json:"device_id,omitempty"`  // DeviceId is set if the RegKey was created for single use
	ExpiresAt      *time.Time `json:"expires_at,omitempty"` // ExpiresAt is optional, if set the registration key is only valid until the ExpiresAt time.
}

type SecurityGroup

type SecurityGroup struct {
	Base
	Description    string         `json:"description"`
	VpcId          uuid.UUID      `json:"vpc_id"`
	OrganizationID uuid.UUID      `json:"-"` // Denormalized from the VPC record for performance
	InboundRules   []SecurityRule `json:"inbound_rules,omitempty" gorm:"type:JSONB; serializer:json"`
	OutboundRules  []SecurityRule `json:"outbound_rules,omitempty" gorm:"type:JSONB; serializer:json"`
	Revision       uint64         `json:"revision"  gorm:"type:bigserial;index:"`
}

type SecurityRule

type SecurityRule struct {
	IpProtocol string   `json:"ip_protocol"`
	FromPort   int64    `json:"from_port"`
	ToPort     int64    `json:"to_port"`
	IpRanges   []string `json:"ip_ranges,omitempty"`
}

type User

type User struct {
	Base
	IdpID         string
	UserName      string
	Organizations []*Organization `gorm:"many2many:user_organizations"`
}

type VPC

type VPC struct {
	Base
	OrganizationID uuid.UUID `json:"organization_id"`
	Description    string    `json:"description"`
	PrivateCidr    bool      `json:"private_cidr"`
	Ipv4Cidr       string    `json:"ipv4_cidr"`
	Ipv6Cidr       string    `json:"ipv6_cidr"`

	Organization *Organization `json:"-"`
}

Jump to

Keyboard shortcuts

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