definitions

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddConfigActionConfigForm = forms.Form{
	ErrorMsg: "invalid data encountered in the config action config form",
	Fields: []forms.Field{
		{
			Name: "index",
			Validators: []forms.Validator{
				forms.IsRequired{},
				forms.IsInteger{HasMin: true, Min: 0},
			},
		},
	},
}
View Source
var AddConfigDestinationForm = forms.Form{
	ErrorMsg: "invalid data encountered in the config destination form",
	Fields: []forms.Field{
		{
			Name: "status",
			Validators: []forms.Validator{
				forms.IsRequired{},
				forms.IsIn{Choices: []interface{}{"active", "disabled", "testing"}},
			},
		},
		{
			Name: "name",
			Validators: []forms.Validator{
				forms.IsRequired{},
				forms.MatchesRegex{Regex: regexp.MustCompile("^[a-z0-9-]{3,40}$")},
			},
		},
	},
}
View Source
var AddStreamSourceForm = forms.Form{
	ErrorMsg: "invalid data encountered in the stream source adding form",
	Fields: []forms.Field{
		{
			Name: "status",
			Validators: []forms.Validator{
				forms.IsRequired{},
				forms.IsIn{Choices: []interface{}{"active", "disabled", "testing"}},
			},
		},
	},
}
View Source
var DefaultDefinitions = api.Definitions{
	APIControllerDefinitions: map[string]api.APIControllerMaker{
		"inMemory": controllers.MakeInMemoryController,
	},
	Routes: []api.Routes{v1.Initialize},
	ObjectAdaptors: map[string]api.ObjectAdaptor{
		"stream":      StreamAdaptor{},
		"config":      ConfigAdaptor{},
		"source":      SourceAdaptor{},
		"destination": DestinationAdaptor{},
		"action":      ActionConfigAdaptor{},
		"project":     ProjectAdaptor{},
	},
	AssociateAdaptors: map[string]api.AssociateAdaptor{
		"config-action":      AssociateConfigActionConfigAdaptor{},
		"stream-source":      AssociateStreamSourceAdaptor{},
		"config-destination": AssociateConfigDestinationAdaptor{},
	},
	UserProviders: providers.Definitions,
}

Functions

This section is empty.

Types

type ActionConfigAdaptor

type ActionConfigAdaptor struct{}

func (ActionConfigAdaptor) DependsOn

func (f ActionConfigAdaptor) DependsOn() string

func (ActionConfigAdaptor) Get

func (f ActionConfigAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (ActionConfigAdaptor) Initialize

func (f ActionConfigAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (ActionConfigAdaptor) MakeObject

func (a ActionConfigAdaptor) MakeObject(c *gin.Context) kodex.Model

func (ActionConfigAdaptor) Objects

func (a ActionConfigAdaptor) Objects(c *gin.Context) []kodex.Model

func (ActionConfigAdaptor) Type

func (f ActionConfigAdaptor) Type() string

type AssociateConfigActionConfigAdaptor

type AssociateConfigActionConfigAdaptor struct{}

func (AssociateConfigActionConfigAdaptor) Associate

func (a AssociateConfigActionConfigAdaptor) Associate(c *gin.Context, left, right kodex.Model) bool

func (AssociateConfigActionConfigAdaptor) Dissociate

func (a AssociateConfigActionConfigAdaptor) Dissociate(c *gin.Context, left, right kodex.Model) bool

func (AssociateConfigActionConfigAdaptor) Get

func (a AssociateConfigActionConfigAdaptor) Get(c *gin.Context, left kodex.Model) interface{}

func (AssociateConfigActionConfigAdaptor) LeftType

func (AssociateConfigActionConfigAdaptor) RightType

type AssociateConfigDestinationAdaptor

type AssociateConfigDestinationAdaptor struct{}

func (AssociateConfigDestinationAdaptor) Associate

func (a AssociateConfigDestinationAdaptor) Associate(c *gin.Context, left, right kodex.Model) bool

func (AssociateConfigDestinationAdaptor) Dissociate

func (a AssociateConfigDestinationAdaptor) Dissociate(c *gin.Context, left, right kodex.Model) bool

func (AssociateConfigDestinationAdaptor) Get

func (a AssociateConfigDestinationAdaptor) Get(c *gin.Context, left kodex.Model) interface{}

func (AssociateConfigDestinationAdaptor) LeftType

func (AssociateConfigDestinationAdaptor) RightType

type AssociateStreamSourceAdaptor

type AssociateStreamSourceAdaptor struct{}

func (AssociateStreamSourceAdaptor) Associate

func (a AssociateStreamSourceAdaptor) Associate(c *gin.Context, left, right kodex.Model) bool

func (AssociateStreamSourceAdaptor) Dissociate

func (a AssociateStreamSourceAdaptor) Dissociate(c *gin.Context, left, right kodex.Model) bool

func (AssociateStreamSourceAdaptor) Get

func (a AssociateStreamSourceAdaptor) Get(c *gin.Context, left kodex.Model) interface{}

func (AssociateStreamSourceAdaptor) LeftType

func (a AssociateStreamSourceAdaptor) LeftType() string

func (AssociateStreamSourceAdaptor) RightType

func (a AssociateStreamSourceAdaptor) RightType() string

type ConfigAdaptor

type ConfigAdaptor struct{}

func (ConfigAdaptor) DependsOn

func (f ConfigAdaptor) DependsOn() string

func (ConfigAdaptor) Get

func (f ConfigAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (ConfigAdaptor) Initialize

func (f ConfigAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (ConfigAdaptor) MakeObject

func (a ConfigAdaptor) MakeObject(c *gin.Context) kodex.Model

func (ConfigAdaptor) Objects

func (a ConfigAdaptor) Objects(c *gin.Context) []kodex.Model

func (ConfigAdaptor) Type

func (f ConfigAdaptor) Type() string

type DestinationAdaptor

type DestinationAdaptor struct{}

func (DestinationAdaptor) DependsOn

func (f DestinationAdaptor) DependsOn() string

func (DestinationAdaptor) Get

func (f DestinationAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (DestinationAdaptor) Initialize

func (f DestinationAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (DestinationAdaptor) MakeObject

func (a DestinationAdaptor) MakeObject(c *gin.Context) kodex.Model

func (DestinationAdaptor) Objects

func (a DestinationAdaptor) Objects(c *gin.Context) []kodex.Model

func (DestinationAdaptor) Type

func (f DestinationAdaptor) Type() string

type ProjectAdaptor

type ProjectAdaptor struct{}

func (ProjectAdaptor) DependsOn

func (f ProjectAdaptor) DependsOn() string

func (ProjectAdaptor) Get

func (f ProjectAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (ProjectAdaptor) Initialize

func (f ProjectAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (ProjectAdaptor) MakeObject

func (a ProjectAdaptor) MakeObject(c *gin.Context) kodex.Model

func (ProjectAdaptor) Objects

func (a ProjectAdaptor) Objects(c *gin.Context) []kodex.Model

func (ProjectAdaptor) Type

func (f ProjectAdaptor) Type() string

type SourceAdaptor

type SourceAdaptor struct{}

func (SourceAdaptor) DependsOn

func (f SourceAdaptor) DependsOn() string

func (SourceAdaptor) Form

func (f SourceAdaptor) Form() forms.Form

func (SourceAdaptor) Get

func (f SourceAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (SourceAdaptor) Initialize

func (f SourceAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (SourceAdaptor) MakeObject

func (a SourceAdaptor) MakeObject(c *gin.Context) kodex.Model

func (SourceAdaptor) Objects

func (a SourceAdaptor) Objects(c *gin.Context) []kodex.Model

func (SourceAdaptor) Type

func (f SourceAdaptor) Type() string

type StreamAdaptor

type StreamAdaptor struct{}

func (StreamAdaptor) DependsOn

func (f StreamAdaptor) DependsOn() string

func (StreamAdaptor) Get

func (f StreamAdaptor) Get(controller api.Controller, c *gin.Context, id []byte) (kodex.Model, kodex.Model, error)

func (StreamAdaptor) Initialize

func (f StreamAdaptor) Initialize(controller api.Controller, g *gin.RouterGroup) error

func (StreamAdaptor) MakeObject

func (a StreamAdaptor) MakeObject(c *gin.Context) kodex.Model

func (StreamAdaptor) Objects

func (a StreamAdaptor) Objects(c *gin.Context) []kodex.Model

func (StreamAdaptor) Type

func (f StreamAdaptor) Type() string

Jump to

Keyboard shortcuts

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