model

package
v0.0.0-...-eae6339 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Id          string    `json:"id"          bson:"id"`
	Parent      string    `json:"parent"      bson:"parent"`
	MeshId      string    `json:"meshId"      bson:"meshId"`
	MeshName    string    `json:"meshName"    bson:"meshName"`
	Name        string    `json:"name"        bson:"name"`
	Email       string    `json:"email"       bson:"email"`
	Role        string    `json:"role"        bson:"role"`
	Status      string    `json:"status"      bson:"status"`
	Key         string    `json:"key"         bson:"key"`
	From        string    `json:"from"        bson:"from"`
	AccountName string    `json:"accountName" bson:"accountName"`
	Created     time.Time `json:"created"     bson:"created"`
}

func (Account) IsValid

func (a Account) IsValid() []error

IsValid check if model is valid

type Auth

type Auth struct {
	Oauth2   bool   `json:"oauth2"`
	ClientId string `json:"clientId"`
	Code     string `json:"code"`
	State    string `json:"state"`
	CodeUrl  string `json:"codeUrl"`
}

Auth structure

type Host

type Host struct {
	Id        string    `json:"id"                        bson:"id"`
	AccountId string    `json:"accountid"                 bson:"accountid"`
	Name      string    `json:"name"                      bson:"name"`
	HostGroup string    `json:"hostGroup"                 bson:"hostGroup"`
	Type      string    `json:"type"                      bson:"type"`
	Role      string    `json:"role"                      bson:"role"`
	MeshId    string    `json:"meshid"                    bson:"meshid"`
	MeshName  string    `json:"meshName"                  bson:"meshName"`
	APIKey    string    `json:"apiKey"                    bson:"apiKey"`
	Email     string    `json:"email"                     bson:"email"`
	Enable    bool      `json:"enable"                    bson:"enable"`
	Tags      []string  `json:"tags"                      bson:"tags"`
	Platform  string    `json:"platform"                  bson:"platform"`
	Version   string    `json:"version"                   bson:"version"`
	CreatedBy string    `json:"createdBy"                 bson:"createdBy"`
	UpdatedBy string    `json:"updatedBy"                 bson:"updatedBy"`
	Created   time.Time `json:"created"                   bson:"created"`
	Updated   time.Time `json:"updated"                   bson:"updated"`
	LastSeen  time.Time `json:"lastSeen"				  bson:"lastSeen"`
	Current   Settings  `json:"current"                   bson:"current"`
	Default   Settings  `json:"default"                   bson:"default"`
}

Host structure

func (Host) IsValid

func (a Host) IsValid() []error

IsValid check if model is valid

type HostConfig

type HostConfig struct {
	MeshName string `json:"meshName"  bson:"meshName"`
	MeshId   string `json:"meshid"    bson:"meshid"`
	Hosts    []Host `json:"hosts"      bson:"hosts"`
}

Peer structure

type Mesh

type Mesh struct {
	Id          string    `json:"id"          bson:"id"`
	AccountId   string    `json:"accountid"   bson:"accountid"`
	MeshName    string    `json:"meshName"    bson:"meshName"`
	Description string    `json:"description" bson:"description"`
	CreatedBy   string    `json:"createdBy"   bson:"createdBy"`
	UpdatedBy   string    `json:"updatedBy"   bson:"updatedBy"`
	Created     time.Time `json:"created"     bson:"created"`
	Updated     time.Time `json:"updated"     bson:"updated"`
	Enabled     bool      `json:"enabled"     bson:"enabled"`
	Default     Settings  `json:"default"     bson:"default"`
}

Mesh structure

func (Mesh) IsValid

func (a Mesh) IsValid() []error

IsValid check if model is valid

type Message

type Message struct {
	Id     string       `json:"id"       bson:"id"`
	Config []HostConfig `json:"config"   bson:"config"`
}

Host structure

type Server

type Server struct {
	Id            string `json:"id" bson:"id"`
	Name          string `json:"name" bson:"name"`
	Description   string `json:"description" bson:"description"`
	IpAddress     string `json:"ipAddress" bson:"ipAddress"`
	PortMin       int    `json:"portMin" bson:"portMin"`
	PortMax       int    `json:"portMax" bson:"portMax"`
	ServiceGroup  string `json:"serviceGroup" bson:"serviceGroup"`
	ServiceApiKey string `json:"serviceApiKey" bson:"serviceApiKey"`
	DefaultSubnet string `json:"defaultSubnet" bson:"defaultSubnet"`
}

Server structure

func (Server) IsValid

func (a Server) IsValid() []error

IsValid check if model is valid

type Service

type Service struct {
	Id             string    `json:"id"           bson:"id"`
	ServiceGroup   string    `json:"serviceGroup" bson:"serviceGroup"`
	ApiKey         string    `json:"apikey"       bson:"apikey"`
	AccountId      string    `json:"accountid"    bson:"accountid"`
	Email          string    `json:"email"        bson:"email"`
	SubscriptionId string    `json:"subscriptionid" bson:"subscriptionid"`
	Created        time.Time `json:"created"      bson:"created"`
	Updated        time.Time `json:"updated"      bson:"updated"`
	CreatedBy      string    `json:"createdBy"    bson:"createdBy"`
	UpdatedBy      string    `json:"updatedBy"    bson:"updatedBy"`
	RelayHost      Host      `json:"relayHost"    bson:"relayHost"`
	ContainerId    string    `json:"containerId"  bson:"containerId"`
	Status         string    `json:"status"       bson:"status"`
	ServiceHost    string    `json:"serviceHost"  bson:"serviceHost"`
	Name           string    `json:"name"         bson:"name"`
	Description    string    `json:"description"  bson:"description"`
	ServiceType    string    `json:"serviceType"  bson:"serviceType"`
	ServicePort    int       `json:"servicePort"  bson:"servicePort"`
	DefaultSubnet  string    `json:"defaultSubnet" bson:"defaultSubnet"`
}

Mesh structure

func (Service) IsValid

func (s Service) IsValid() []error

IsValid check if model is valid

type ServiceMessage

type ServiceMessage struct {
	Id     string    `json:"id"       bson:"id"`
	Config []Service `json:"config"   bson:"config"`
}

type Settings

type Settings struct {
	PrivateKey          string   `json:"privateKey"                bson:"privateKey"`
	PublicKey           string   `json:"publicKey"                 bson:"publicKey"`
	PresharedKey        string   `json:"presharedKey"              bson:"presharedKey"`
	AllowedIPs          []string `json:"allowedIPs"                bson:"allowedIPs"`
	Address             []string `json:"address"                   bson:"address"`
	Dns                 []string `json:"dns"                       bson:"dns"`
	Table               string   `json:"table"                     bson:"table"`
	PersistentKeepalive int      `json:"persistentKeepalive"       bson:"persistentKeepalive"`
	ListenPort          int      `json:"listenPort"                bson:"listenPort"`
	Endpoint            string   `json:"endpoint"                  bson:"endpoint"`
	Mtu                 int      `json:"mtu"                       bson:"mtu"`
	SubnetRouting       bool     `json:"subnetRouting"             bson:"subnetRouting"`
	UPnP                bool     `json:"upnp"                      bson:"upnp"`
	EnableDns           bool     `json:"enableDns"                 bson:"enableDns"`
	PreUp               string   `json:"preUp"                     bson:"preUp"`
	PostUp              string   `json:"postUp"                    bson:"postUp"`
	PreDown             string   `json:"preDown"                   bson:"preDown"`
	PostDown            string   `json:"postDown"                  bson:"postDown"`
}

Host structure

func (Settings) IsValid

func (a Settings) IsValid() []error

IsValid check if model is valid

type Subscription

type Subscription struct {
	Id          string    `json:"id"          bson:"id"`
	AccountId   string    `json:"accountid"   bson:"accountid"`
	Email       string    `json:"email"       bson:"email"`
	Name        string    `json:"name"        bson:"name"`
	Description string    `json:"description" bson:"description"`
	Issued      time.Time `json:"issued"      bson:"issued"`
	Expires     time.Time `json:"expires"     bson:"expires"`
	LastUpdated time.Time `json:"lastUpdated" bson:"lastUpdated"`
	CreatedBy   string    `json:"createdBy"   bson:"createdBy"`
	UpdatedBy   string    `json:"updatedBy"   bson:"updatedBy"`
	Status      string    `json:"status"      bson:"status"`
	Sku         string    `json:"sku"         bson:"sku"`
	Credits     int       `json:"credits"     bson:"credits"`
	AutoRenew   bool      `json:"autoRenew"   bson:"autoRenew"`
}

Mesh structure

func (Subscription) IsValid

func (s Subscription) IsValid() []error

IsValid check if model is valid

type User

type User struct {
	Sub       string    `json:"sub"          bson:"sub"`
	Name      string    `json:"name"         bson:"name"`
	Email     string    `json:"email"        bson:"email"`
	AccountId string    `json:"accountid"    bson:"accountid"`
	Profile   string    `json:"profile"      bson:"profile"`
	Picture   string    `json:"picture"      bson:"picture"`
	Issuer    string    `json:"issuer"       bson:"issuer"`
	Plan      string    `json:"plan"         bson:"plan"`
	IssuedAt  time.Time `json:"issuedAt"     bson:"issuedAt"`
	CreatedBy string    `json:"createdBy"    bson:"createdBy"`
	Created   time.Time `json:"created_at"   bson:"created_at"`
	UpdatedBy string    `json:"updatedBy"    bson:"updatedBy"`
	Updated   time.Time `json:"updated_at"   bson:"updated_at"`
}

User structure

func (User) IsValid

func (a User) IsValid() []error

IsValid check if model is valid

Jump to

Keyboard shortcuts

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