model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVDoc

type KVDoc struct {
	ID        primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	LabelID   string             `json:"label_id,omitempty" bson:"label_id,omitempty"`
	Key       string             `json:"key"`
	Value     string             `json:"value,omitempty"`
	ValueType string             `json:"value_type,omitempty" bson:"value_type,omitempty"` //ini,json,text,yaml,properties
	Checker   string             `json:"check,omitempty"`                                  //python script

	Labels   map[string]string `json:"labels,omitempty"` //redundant
	Domain   string            `json:"domain,omitempty"` //redundant
	Revision int               `json:"revision,omitempty" bson:"-"`
	Project  string            `json:"project,omitempty"`
}

KVDoc is database struct to store kv

type KVResponse

type KVResponse struct {
	LabelDoc *LabelDocResponse `json:"label"`
	Data     []*KVDoc          `json:"data"`
}

KVResponse represents the key value list

type LabelDoc

type LabelDoc struct {
	ID       primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Labels   map[string]string  `json:"labels,omitempty"`
	Revision int                `json:"revision,omitempty"`
	Domain   string             `json:"domain,omitempty"` //tenant info
	Project  string             `json:"project,omitempty"`
}

LabelDoc is database struct to store labels

type LabelDocResponse

type LabelDocResponse struct {
	LabelID string            `json:"label_id,omitempty"`
	Labels  map[string]string `json:"labels,omitempty"`
}

LabelDocResponse is label struct

type LabelHistoryResponse

type LabelHistoryResponse struct {
	LabelID  string            `json:"label_id,omitempty"  bson:"label_id,omitempty"`
	Labels   map[string]string `json:"labels,omitempty"`
	KVs      []*KVDoc          `json:"data,omitempty"`
	Revision int               `json:"revision"`
}

LabelHistoryResponse is label history revision struct

type LabelRevisionDoc

type LabelRevisionDoc struct {
	ID       primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	LabelID  string             `json:"label_id,omitempty"  bson:"label_id,omitempty"`
	Labels   map[string]string  `json:"labels,omitempty"`
	Domain   string             `json:"-"`
	KVs      []*KVDoc           `json:"data,omitempty"`
	Revision int                `json:"revision"`
}

LabelRevisionDoc is database struct to store label history stats

Jump to

Keyboard shortcuts

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