Documentation ¶
Index ¶
Constants ¶
const Version string = "v1"
Version of the structure.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DOTStorage ¶
type DOTStorage struct{}
DOTStorage provides storage in a graphviz DOT format
func (*DOTStorage) Read ¶
func (s *DOTStorage) Read() (id.IngressDescriptor, *id.Error)
func (*DOTStorage) Store ¶
func (s *DOTStorage) Store(idef id.IngressDescriptor) *id.Error
Store ingress descriptor in the DOT file
type GraphVizExporter ¶
type GraphVizExporter struct{}
GraphVizExporter export to SVG graph representation and open browser.
func NewGraphVizExporter ¶
func NewGraphVizExporter() *GraphVizExporter
NewGraphVizExporter create a new GraphVizExporter
func (*GraphVizExporter) Export ¶
func (e *GraphVizExporter) Export(ep id.PullerPlan) *id.Error
Export to a temporary svg file and open it.
type JSONIngressDescriptor ¶
type JSONIngressDescriptor struct { StartTable string `json:"startTable"` Relations []JSONRelation `json:"relations"` }
JSONIngressDescriptor defines how to store an ingress descriptor in JSON format.
type JSONRelation ¶
type JSONRelation struct { Name string `json:"name"` Parent JSONTable `json:"parent"` Child JSONTable `json:"child"` }
JSONRelation defines how to store a relation in JSON format.
type JSONStorage ¶
type JSONStorage struct {
// contains filtered or unexported fields
}
JSONStorage provides storage in a local JSON file
func NewJSONStorage ¶
func NewJSONStorage(file os.File) *JSONStorage
NewJSONStorage create a new JSON storage
func (*JSONStorage) Read ¶
func (s *JSONStorage) Read() (id.IngressDescriptor, *id.Error)
func (*JSONStorage) Store ¶
func (s *JSONStorage) Store(id id.IngressDescriptor) *id.Error
Store ingress descriptor in the JSON file
type JSONStructure ¶
type JSONStructure struct { Version string `json:"version"` IngressDescriptor JSONIngressDescriptor `json:"IngressDescriptor"` }
JSONStructure of the file.
type MultiStorage ¶
type MultiStorage struct {
// contains filtered or unexported fields
}
MultiStorage provides storage in multiple backend storages
func NewMultiStorage ¶
func NewMultiStorage(storages ...id.Storage) *MultiStorage
NewMultiStorage create a new multi-storage
func (*MultiStorage) Read ¶
func (s *MultiStorage) Read() (id.IngressDescriptor, *id.Error)
func (*MultiStorage) Store ¶
func (s *MultiStorage) Store(adef id.IngressDescriptor) *id.Error
Store ingress descriptor in all the backends storages
type RelationReader ¶
type RelationReader struct {
// contains filtered or unexported fields
}
RelationReader is an adapter to read relations from the relation domain.
func NewRelationReader ¶
func NewRelationReader(relations []relation.Relation) *RelationReader
NewRelationReader create a new relations reader
func (*RelationReader) Read ¶
func (r *RelationReader) Read() (id.RelationList, *id.Error)
type TableStorage ¶
type TableStorage struct {
// contains filtered or unexported fields
}
TableStorage provides simple storage for one table Ingress Descriptor
func NewTableStorage ¶
func NewTableStorage(table id.Table) *TableStorage
NewTableStorage create a new TableStorage
func (*TableStorage) Read ¶
func (s *TableStorage) Read() (id.IngressDescriptor, *id.Error)
Read create new Ingress Descriptor with table as start table without relations
func (*TableStorage) Store ¶
func (s *TableStorage) Store(adef id.IngressDescriptor) *id.Error
Store raise not implemented error
type YAMLIngressDescriptor ¶
type YAMLIngressDescriptor struct { StartTable string `yaml:"startTable"` Relations []YAMLRelation `yaml:"relations"` }
YAMLIngressDescriptor defines how to store an ingress descriptor in YAML format.
type YAMLRelation ¶
type YAMLRelation struct { Name string `yaml:"name"` Parent YAMLTable `yaml:"parent"` Child YAMLTable `yaml:"child"` }
YAMLRelation defines how to store a relation in YAML format.
type YAMLStorage ¶
type YAMLStorage struct {
// contains filtered or unexported fields
}
YAMLStorage provides storage in a local YAML file
func NewYAMLStorage ¶
func NewYAMLStorage(filename string) *YAMLStorage
NewYAMLStorage create a new YAML storage
func (*YAMLStorage) Read ¶
func (s *YAMLStorage) Read() (id.IngressDescriptor, *id.Error)
func (*YAMLStorage) Store ¶
func (s *YAMLStorage) Store(id id.IngressDescriptor) *id.Error
Store ingress descriptor in the YAML file
type YAMLStructure ¶
type YAMLStructure struct { Version string `yaml:"version"` IngressDescriptor YAMLIngressDescriptor `yaml:"IngressDescriptor"` }
YAMLStructure of the file.