models

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessProductType added in v0.0.8

type AccessProductType string
const (
	AccessProductTypePhysical AccessProductType = "PHYSICAL"
	AccessProductTypeVirtual  AccessProductType = "VIRTUAL"
)

func (AccessProductType) String added in v0.0.8

func (at AccessProductType) String() string

type Account added in v1.2.0

type Account struct {
	BaseModel
	Name             string `json:"name" binding:"required"`
	Address          string `json:"address" binding:"required"`
	ZipCode          string `json:"zipCode" binding:"required"`
	City             string `json:"city" binding:"required"`
	Country          string `json:"country" binding:"required"`
	FinancialContact string `json:"financialContact,omitempty"`
	TechnicalContact string `json:"technicalContact,omitempty"`
}

type Accounts added in v1.2.0

type Accounts []Account

type AddProduct

type AddProduct struct {
	SKU string `json:"sku" binding:"required"`
}

type AdministrativeState

type AdministrativeState string
const (
	AdministrativeStateCreationPending AdministrativeState = "creation_pending"
	AdministrativeStateCreationProceed AdministrativeState = "creation_proceed"
	AdministrativeStateCreationError   AdministrativeState = "creation_error"
	AdministrativeStateCreated         AdministrativeState = "created"
	AdministrativeStateDeployed        AdministrativeState = "deployed"
	AdministrativeStateDeletePending   AdministrativeState = "delete_pending"
	AdministrativeStateDeleteProceed   AdministrativeState = "delete_proceed"
	AdministrativeStateDeleteError     AdministrativeState = "delete_error"
	AdministrativeStateDeleted         AdministrativeState = "deleted"
)

func (AdministrativeState) String added in v0.0.2

func (as AdministrativeState) String() string

type Attachment added in v0.0.7

type Attachment struct {
	BaseModel
	TransportID string              `json:"transportId"`
	NodeID      string              `json:"nodeId"`
	State       AdministrativeState `json:"administrativeState"`
	Side        string              `json:"side"`
	DeployedAt  *time.Time          `json:"deployedAt,omitempty"`
	Error       *SupportError       `json:"error,omitempty"`
	WorkspaceID string              `json:"workspaceId"`
}

func (*Attachment) GetState added in v0.0.11

func (a *Attachment) GetState() AdministrativeState

type AttachmentResponse added in v0.0.7

type AttachmentResponse struct {
	Data Attachment `json:"data"`
}

type BaseModel

type BaseModel struct {
	ID        uuid.UUID `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	DeletedAt time.Time `json:"-"`
}

type CreateAttachment added in v0.0.7

type CreateAttachment struct {
	NodeID      string `json:"nodeId" binding:"required"`
	TransportID string `json:"transportId" binding:"required"`
}

type CreateNode

type CreateNode struct {
	Name           string               `json:"name" binding:"required"`
	Type           NodeType             `json:"type" binding:"required"`
	Product        AddProduct           `json:"product" binding:"required"`
	ProviderConfig *ProviderCloudConfig `json:"providerConfig" binding:"required_if=Type cloud"`
	PhysicalPortID *uuid.UUID           `json:"physicalPortId,omitempty"`
	Vlan           int64                `json:"vlan,omitempty"`
}

type CreatePhysicalPort added in v0.0.14

type CreatePhysicalPort struct {
	Name    string     `json:"name" binding:"required"`
	Product AddProduct `json:"product" binding:"required"`
}

type CreateTransport added in v0.0.4

type CreateTransport struct {
	Name    string     `json:"name" binding:"required"`
	Product AddProduct `json:"product" binding:"required"`
}

type CreateUser added in v1.3.0

type CreateUser struct {
	Name      string `json:"name" binding:"required"`
	Email     string `json:"email" binding:"required"`
	ProfileId string `json:"profileId"`
}

type CreateWorkspace

type CreateWorkspace struct {
	Name        string `json:"name" binding:"required"`
	Description string `json:"description"`
}

type Node

type Node struct {
	BaseModel
	WorkspaceID    string               `json:"workspaceId"`
	Name           string               `json:"name"`
	State          AdministrativeState  `json:"administrativeState"`
	DeployedAt     *time.Time           `json:"deployedAt,omitempty"`
	Product        NodeProduct          `json:"product,omitempty"`
	Type           NodeType             `json:"type,omitempty"`
	ConnectionID   string               `json:"connectionId,omitempty"`
	Port           *Port                `json:"port,omitempty"`
	ProviderConfig *ProviderCloudConfig `json:"providerConfig,omitempty"`
	Vlan           int64                `json:"vlan,omitempty"`
	DxconID        string               `json:"dxconId,omitempty"`
	Error          *SupportError        `json:"error,omitempty"`
	PhysicalPort   *PhysicalPort        `json:"physicalPort,omitempty"`
	ServiceKey     *ServiceKey          `json:"serviceKey,omitempty"`
}

func (*Node) GetState added in v0.0.11

func (n *Node) GetState() AdministrativeState

type NodeProduct

type NodeProduct struct {
	Product
	CSPName         string            `json:"cspName,omitempty"`
	CSPNameUnderlay string            `json:"cspNameUnderlay,omitempty"`
	CSPCity         string            `json:"cspCity,omitempty"`
	CSPRegion       string            `json:"cspRegion,omitempty"`
	Type            AccessProductType `json:"type,omitempty"`
}

type NodeResponse

type NodeResponse struct {
	Data Node `json:"data"`
}

type NodeType

type NodeType string
const (
	NodeTypeAccess NodeType = "access"
	NodeTypeCloud  NodeType = "cloud"
	NodeTypeBridge NodeType = "bridge"
	NodeTypeRouter NodeType = "router"
)

func (NodeType) String added in v0.0.2

func (nt NodeType) String() string

type PhysicalPort added in v0.0.10

type PhysicalPort struct {
	BaseModel
	Name               string              `json:"name"`
	AccountID          string              `json:"accountId"`
	Product            PhysicalPortProduct `json:"product"`
	AvailableBandwidth int                 `json:"availableBandwidth"`
	State              AdministrativeState `json:"administrativeState"`
	UsedVLANs          []int64             `json:"usedVlans"`
	LOAAccessURL       string              `json:"loaAccessUrl"`
}

type PhysicalPortListResponse added in v0.0.14

type PhysicalPortListResponse struct {
	Data []PhysicalPort `json:"data"`
}

type PhysicalPortProduct added in v0.0.12

type PhysicalPortProduct struct {
	Product
}

type PhysicalPortSingleResponse added in v0.0.14

type PhysicalPortSingleResponse struct {
	Data PhysicalPort `json:"data"`
}

type Port

type Port struct {
	ID              string `json:"id"`
	LocationID      string `json:"locationId"`
	CSPName         string `json:"cspName"`
	CSPNameUnderlay string `json:"cspNameUnderlay"`
}

type Product

type Product struct {
	Provider  ProviderType `json:"provider"`
	Duration  int          `json:"duration"`
	Location  string       `json:"location"`
	Bandwidth int          `json:"bandwidth"`
	Date      time.Time    `json:"date"`
	PriceNRC  int          `json:"priceNrc"`
	PriceMRC  int          `json:"priceMrc"`
	CostNRC   int          `json:"costNrc"`
	CostMRC   int          `json:"costMrc"`
	SKU       string       `json:"sku"`
}

type ProviderCloudConfig

type ProviderCloudConfig struct {
	PairingKey string `json:"pairingKey,omitempty"`
	AccountID  string `json:"accountId,omitempty"`
	ServiceKey string `json:"serviceKey,omitempty"`
}

type ProviderType added in v0.0.8

type ProviderType string
const (
	ProviderTypeIntercloud ProviderType = "InterCloud"
	ProviderTypeMegaport   ProviderType = "MEGAPORT"
	ProviderTypeEquinix    ProviderType = "EQUINIX"
)

func (ProviderType) String added in v0.0.8

func (pt ProviderType) String() string

type Self

type Self struct {
	AccountID uuid.UUID `json:"accountId"`
}

type ServiceKey added in v1.0.0

type ServiceKey struct {
	ID             string    `json:"id,omitempty"`
	ExpirationDate time.Time `json:"expirationDate,omitempty"`
	Name           string    `json:"name,omitempty"`
}

type SupportError added in v0.0.3

type SupportError struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

type Transport added in v0.0.4

type Transport struct {
	BaseModel
	WorkspaceID    string              `json:"workspaceId"`
	Name           string              `json:"name"`
	State          AdministrativeState `json:"administrativeState"`
	DeployedAt     *time.Time          `json:"deployedAt,omitempty"`
	Error          *SupportError       `json:"error,omitempty"`
	TransportVlans TransportVlans      `json:"vlans,omitempty"`
	IsLocal        bool                `json:"isLocal"`
	Product        TransportProduct    `json:"product,omitempty"`
	ConnectionID   string              `json:"connectionId,omitempty"`
}

func (*Transport) GetState added in v0.0.11

func (t *Transport) GetState() AdministrativeState

type TransportProduct added in v0.0.4

type TransportProduct struct {
	Product
	LocationTo string `json:"locationTo"`
}

type TransportResponse added in v0.0.4

type TransportResponse struct {
	Data Transport `json:"data"`
}

type TransportVlans added in v0.0.4

type TransportVlans struct {
	AVlan int64 `json:"aVlan,omitempty"`
	ZVlan int64 `json:"zVlan,omitempty"`
}

type UpdateElement added in v0.0.4

type UpdateElement struct {
	Name string `json:"name"`
}

type UpdateWorkspace

type UpdateWorkspace struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type User added in v1.2.0

type User struct {
	BaseModel
	Name            string     `json:"name"`
	Email           string     `json:"email"`
	Activated       bool       `json:"activated"`
	AccountID       uuid.UUID  `json:"accountId"`
	CGUAcceptedDate *time.Time `json:"cguAcceptedDate,omitempty"`
	LastConnection  *time.Time `json:"lastConnection,omitempty"`
	IsAdmin         bool       `json:"isAdmin"`
}

type Users added in v1.2.0

type Users []User

type Workspace

type Workspace struct {
	BaseModel
	Name        string `json:"name"`
	Description string `json:"description"`
	AccountID   string `json:"accountId"`
}

type WorkspaceResponse

type WorkspaceResponse struct {
	Data Workspace `json:"data"`
}

type WorkspacesResponse added in v1.2.0

type WorkspacesResponse struct {
	Data []Workspace `json:"data"`
}

Jump to

Keyboard shortcuts

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