structureSpec

package
v1.2.0-pre Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Id          string
	Name        string
	Description string
	Tags        []string
}

type Basic

type Basic interface {
	SimpleIface
	BasicPath(branch, commit, project, app string) (*common.TnsPath, error)
}

type Database

type Database struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Match string
	Regex bool `mapstructure:"useRegex"`
	Local bool
	Key   string
	Min   int
	Max   int
	Size  uint64

	// noset, this is parsed from the tags
	SmartOps []string

	Basic
	Indexer
}

func (*Database) BasicPath

func (d *Database) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Database) GetId

func (d *Database) GetId() string

func (Database) GetName

func (d Database) GetName() string

func (*Database) IndexPath

func (d *Database) IndexPath(project, app string) *common.TnsPath

func (*Database) IndexValue

func (d *Database) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Database) SetId

func (d *Database) SetId(id string)

type Domain

type Domain struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Fqdn     string
	CertType string `mapstructure:"cert-type"`
	CertFile string `mapstructure:"cert-file"`
	KeyFile  string `mapstructure:"key-file"`

	// noset, this is parsed from the tags
	SmartOps []string

	Indexer
}

func (*Domain) GetId

func (d *Domain) GetId() string

func (Domain) GetName

func (d Domain) GetName() string

func (*Domain) IndexValue

func (d *Domain) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Domain) SetId

func (d *Domain) SetId(id string)

type Function

type Function struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Type     string
	Timeout  uint64
	Memory   uint64
	Call     string
	Source   string
	Domains  []string
	Method   string
	Paths    []string
	Secure   bool
	Command  string
	Channel  string
	Local    bool
	Protocol string `mapstructure:"service"`
	SmartOps []string

	Wasm
}

func (*Function) BasicPath

func (f *Function) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Function) GetId

func (f *Function) GetId() string

func (Function) GetName

func (f Function) GetName() string

func (*Function) HttpPath

func (f *Function) HttpPath(fqdn string) (*common.TnsPath, error)

func (*Function) IndexValue

func (f *Function) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Function) ModuleName

func (f *Function) ModuleName() string

func (*Function) ServicesPath

func (f *Function) ServicesPath(project, app, serviceId string) (*common.TnsPath, error)

func (*Function) SetId

func (f *Function) SetId(id string)

func (*Function) WasmModulePath

func (f *Function) WasmModulePath(project, app string) (*common.TnsPath, error)

type Indexer

type Indexer interface {
	SimpleIface
	IndexValue(branch, project, app string) (*common.TnsPath, error)
}

type Library

type Library struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Path     string
	Branch   string
	Provider string
	RepoID   string `mapstructure:"repository-id"`
	RepoName string `mapstructure:"repository-name"`

	// noset, this is parsed from the tags
	SmartOps []string

	Wasm
}

func (*Library) BasicPath

func (l *Library) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Library) GetId

func (l *Library) GetId() string

func (Library) GetName

func (l Library) GetName() string

func (*Library) IndexValue

func (l *Library) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Library) ModuleName

func (l *Library) ModuleName() string

func (*Library) NameIndex

func (l *Library) NameIndex() *common.TnsPath

func (*Library) SetId

func (l *Library) SetId(id string)

func (*Library) WasmModulePath

func (l *Library) WasmModulePath(project, app string) (*common.TnsPath, error)

type Messaging

type Messaging struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Local     bool
	Match     string
	Regex     bool
	MQTT      bool
	WebSocket bool

	// noset, this is parsed from the tags
	SmartOps []string

	Basic
	Wasm
}

func (*Messaging) BasicPath

func (m *Messaging) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Messaging) EmptyPath

func (m *Messaging) EmptyPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Messaging) GetId

func (m *Messaging) GetId() string

func (Messaging) GetName

func (m Messaging) GetName() string

func (*Messaging) IndexValue

func (m *Messaging) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Messaging) SetId

func (m *Messaging) SetId(id string)

func (*Messaging) WebSocketHashPath

func (m *Messaging) WebSocketHashPath(project, app string) (*common.TnsPath, error)

func (*Messaging) WebSocketPath

func (m *Messaging) WebSocketPath(hash string) (*common.TnsPath, error)

type Service

type Service struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Protocol string

	// noset, this is parsed from the tags
	SmartOps []string

	Indexer
}

func (*Service) EmptyPath

func (s *Service) EmptyPath(branch, commit, projectId, appId string) (*common.TnsPath, error)

func (*Service) GetId

func (s *Service) GetId() string

func (Service) GetName

func (s Service) GetName() string

func (*Service) IndexValue

func (s *Service) IndexValue(branch, projectId, appId string) (*common.TnsPath, error)

func (*Service) SetId

func (s *Service) SetId(id string)

type Simple

type Simple struct{}

func (Simple) BasicPath

func (Simple) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (Simple) GetId

func (Simple) GetId() string

func (Simple) GetName

func (Simple) GetName() string

func (Simple) SetId

func (Simple) SetId(string)

type SimpleIface

type SimpleIface interface {
	GetName() string
	GetId() string
	SetId(string)
}

type SmartOp

type SmartOp struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Timeout uint64
	Memory  uint64
	Call    string
	Source  string

	// noset, this is parsed from the tags
	SmartOps []string

	Wasm
}

func (*SmartOp) BasicPath

func (s *SmartOp) BasicPath(branch, commit, projectId, appId string) (*common.TnsPath, error)

func (*SmartOp) GetId

func (s *SmartOp) GetId() string

func (SmartOp) GetName

func (s SmartOp) GetName() string

func (*SmartOp) IndexValue

func (s *SmartOp) IndexValue(branch, projectId, appId string) (*common.TnsPath, error)

func (*SmartOp) ModuleName

func (s *SmartOp) ModuleName() string

func (*SmartOp) SetId

func (s *SmartOp) SetId(id string)

func (*SmartOp) WasmModulePath

func (s *SmartOp) WasmModulePath(projectId, appId string) (*common.TnsPath, error)

type Storage

type Storage struct {
	Id          string
	Name        string
	Description string
	Tags        []string

	Match      string
	Regex      bool `mapstructure:"useRegex"`
	Type       string
	Public     bool
	Size       uint64
	Ttl        uint64
	Versioning bool

	// noset, this is parsed from the tags
	SmartOps []string

	Basic
	Indexer
}

func (*Storage) BasicPath

func (s *Storage) BasicPath(branch, commit, project, app string) (*common.TnsPath, error)

func (*Storage) GetId

func (s *Storage) GetId() string

func (Storage) GetName

func (s Storage) GetName() string

func (*Storage) IndexPath

func (s *Storage) IndexPath(project, app string) *common.TnsPath

func (*Storage) IndexValue

func (s *Storage) IndexValue(branch, project, app string) (*common.TnsPath, error)

func (*Storage) SetId

func (s *Storage) SetId(id string)

type Structure

type Structure interface {
	*App |
		*Database |
		*Domain |
		*Function |
		*Library |
		*Messaging |
		*Service |
		*SmartOp |
		*Storage |
		*Website |

		*Simple

	SimpleIface
}

type Wasm

type Wasm interface {
	Basic
	Indexer
	WasmModulePath(project, app string) (*common.TnsPath, error)
	ModuleName() string
}

type Website

type Website struct {
	Id          string
	Name        string
	Description string
	Tags        []string
	Domains     []string
	Paths       []string
	Branch      string
	Provider    string
	RepoID      string `mapstructure:"repository-id"`
	RepoName    string `mapstructure:"repository-name"`

	// noset, this is parsed from the tags
	SmartOps []string

	Basic
	Wasm
}

func (*Website) BasicPath

func (w *Website) BasicPath(branch, commit, projectId, appId string) (*common.TnsPath, error)

func (*Website) GetId

func (w *Website) GetId() string

func (Website) GetName

func (w Website) GetName() string

func (*Website) HttpPath

func (w *Website) HttpPath(fqdn string) (*common.TnsPath, error)

func (*Website) IndexValue

func (w *Website) IndexValue(branch, projectId, appId string) (*common.TnsPath, error)

func (*Website) SetId

func (w *Website) SetId(id string)

func (*Website) WasmModulePath

func (w *Website) WasmModulePath(projectId, appId string) (*common.TnsPath, error)

Jump to

Keyboard shortcuts

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