Documentation
¶
Index ¶
- Constants
- Variables
- func IsValidateStoreType(v string) bool
- func ProjectDoesNotExist(err error) bool
- func ValidateFolderPath(folderPath string) error
- func ValidateName(name string) error
- func ValidateTitle(title string) error
- type Action
- type Actions
- type ApiEndpoint
- type ApiService
- type Board
- type BoardCard
- type BoardCards
- type BoardRow
- type BoardRows
- type BoardWidget
- type Boards
- type CatalogObject
- type CatalogObjectWithRefs
- type CatalogObjects
- type CatalogObjectsWithRefs
- type ChangeType
- type Changeset
- type ChangesetDef
- type ChangesetRefToDataset
- type CharacterSet
- type Check
- type Checks
- type Collation
- type ColumnDiff
- type ColumnModel
- type ColumnModels
- type ColumnsDiff
- type Constraint
- type Credentials
- type DatabaseDifferences
- type DatasetDef
- type DatasetRefToRecordset
- type DatatugProject
- type DatatugStoreBrief
- type DatatugUser
- type DbCatalog
- type DbCatalogBase
- type DbCatalogCounts
- type DbCatalogSummary
- type DbCatalogs
- type DbColumnProps
- type DbModel
- type DbModelDbCatalog
- type DbModelDbCatalogs
- type DbModelEnv
- type DbModelEnvironments
- type DbModels
- type DbSchema
- type DbSchemas
- type DiffDbRef
- type Entities
- type Entity
- type EntityField
- type EntityFieldRef
- type EntityFields
- type EnvDb
- type EnvDbDifference
- type EnvDbServer
- type EnvDbServers
- type EnvState
- type Environment
- type EnvironmentFile
- type EnvironmentSummary
- type Environments
- type Folder
- type FolderBrief
- type FolderItem
- type ForeignKey
- type ForeignKeys
- type HTTPHeaderItem
- type HTTPHeaders
- type HTTPRequest
- type HTTPWidgetDef
- type HideRecordsetColIf
- type HitAndMiss
- type Index
- type IndexColumn
- type Indexes
- type Issues
- type ListOfTags
- type OptionsValueCheck
- type Parameter
- type ParameterDef
- type ParameterLookup
- type Parameters
- type ProjBoardBrief
- type ProjDbModelBrief
- type ProjDbModelNumbers
- type ProjDbServer
- type ProjDbServerFile
- type ProjDbServerSummary
- type ProjDbServers
- type ProjEntityBrief
- type ProjEnvBrief
- type ProjEnvNumbers
- type ProjItemBrief
- type ProjectBrief
- type ProjectCreated
- type ProjectFile
- type ProjectItem
- type ProjectRepository
- type ProjectSummary
- type PropertyDiff
- type QueryDef
- type QueryDefBrief
- type QueryDefTarget
- type QueryDefWithFolderPath
- type QueryDefs
- type QueryFolder
- type QueryFolderBrief
- type QueryFolders
- type QueryResult
- type ReadmeEncoder
- type Recordset
- type RecordsetBaseDef
- type RecordsetColumn
- type RecordsetColumnDef
- type RecordsetColumnDefs
- type RecordsetDefinition
- type RefByForeignKey
- type RegexpValueCheck
- type SQLCheck
- type SQLWidgetDef
- type SQLWidgetSettings
- type SchemaDiff
- type SchemaModel
- type SchemaModels
- type SchemasDiff
- type ServerReference
- type ServerReferences
- type StateByEnv
- type StringPattern
- type StringPatterns
- type TabWidget
- type Table
- type TableColumn
- type TableColumns
- type TableDiff
- type TableKey
- type TableKeys
- type TableModel
- type TableModels
- type TableProps
- type TableReferencedBy
- type TableReferencedBys
- type Tables
- type TablesDiff
- type TabsWidgetDef
- type UniqueKey
- type UniqueKeys
- type UserDatatugInfo
- type ValueRegexCheck
- type VarInfo
- type VarSetting
- type Variables
- type VarsByID
- type WidgetBase
Constants ¶
const ( // TypeString = "string" TypeString = "string" // TypeText = "text" TypeText = "text" // TypeJSON = "JSON" TypeJSON = "JSON" // TypeBit = "bit" TypeBit = "bit" // TypeBoolean = "boolean" TypeBoolean = "boolean" // TypeNumber = "number" TypeNumber = "number" // TypeInteger = "integer" TypeInteger = "integer" // TypeDecimal = "decimal" TypeDecimal = "decimal" // TypeFloat = "float" TypeFloat = "float" // TypeMoney = "money" TypeMoney = "money" // TypeDate = "date" TypeDate = "date" // TypeDateTime = "datetime" TypeDateTime = "datetime" // TypeTime = "time" TypeTime = "time" // TypeGUID = "GUID" TypeGUID = "GUID" // TypeUUID = "UUID" TypeUUID = "UUID" // TypeBinary = "binary" TypeBinary = "binary" // TypeImage = "image" TypeImage = "image" )
const AutoID = "<auto/id>"
AutoID defines a value that indicate system to use automatically generated ID
const FoldersPathSeparator = `/`
FoldersPathSeparator defines a character to be used in folders path
const MaxTagLength = 50
MaxTagLength defines maximum length of a tag = 100
const MaxTitleLength = 100
MaxTitleLength defines maximum length of a title = 100
RootSharedFolderName defines name for a root shared folder
const RootUserFolderPrefix = "user:"
Variables ¶
var ErrProjectDoesNotExist = errors.New("project does not exist")
ErrProjectDoesNotExist is an error that indicates project does not exists
var KnownTypes = []string{ TypeString, TypeText, TypeJSON, TypeBit, TypeBoolean, TypeNumber, TypeInteger, TypeDecimal, TypeFloat, TypeMoney, TypeDate, TypeDateTime, TypeTime, TypeGUID, TypeUUID, TypeBinary, TypeImage, }
KnownTypes enumerates list of known types
Functions ¶
func IsValidateStoreType ¶
IsValidateStoreType checks if storage type has valid value
func ProjectDoesNotExist ¶
ProjectDoesNotExist retports if an error is a wrapper around ErrProjectDoesNotExist
func ValidateFolderPath ¶
ValidateFolderPath validates folder path
Types ¶
type Action ¶
type Action struct {
Type string `json:"type"`
Data interface{} `json:"data"`
Next Actions `json:"next"`
}
Action does something that affects context
type ApiEndpoint ¶
type ApiEndpoint struct {
ProjectItem
QueryType string `json:"queryType" firestore:"queryType"` // REST, RPC, GraphQL
Method string `json:"method" firestore:"method"`
UrlSchema string `json:"urlSchema" firestore:"urlSchema"`
UrlHost string `json:"urlHost" firestore:"urlHost"`
UrlPath string `json:"urlPath" firestore:"urlPath"`
FavoritesCount int `json:"favoritesCount" firestore:"favoritesCount"`
VotesScore int `json:"votesScore" firestore:"votesScore"`
VotesUp int `json:"votesUp" firestore:"votesUp"`
VotesDown int `json:"votesDown" firestore:"votesDown"`
}
func (ApiEndpoint) Validate ¶
func (v ApiEndpoint) Validate() error
type ApiService ¶
type ApiService struct {
ProjectItem
}
func (ApiService) Validate ¶
func (v ApiService) Validate() error
type Board ¶
type Board struct {
ProjBoardBrief
Rows BoardRows `json:"rows,omitempty" firestore:"rows,omitempty"`
}
Board is holding all details about board
type BoardCard ¶
type BoardCard struct {
ID string `json:"id"`
Title string `json:"title"`
Cols int `json:"cols,omitempty"`
Widget *BoardWidget `json:"widget,omitempty"`
}
BoardCard describes board card
type BoardCards ¶
type BoardCards []BoardCard
BoardCards is slice of BoardCard
func (BoardCards) Validate ¶
func (v BoardCards) Validate() error
Validate returns error if not valid
type BoardRow ¶
type BoardRow struct {
MinHeight string `json:"minHeight,omitempty"`
MaxHeight string `json:"maxHeight,omitempty"`
Cards BoardCards `json:"cards,omitempty"`
}
BoardRow holds all details about a row in a board
type BoardWidget ¶
type BoardWidget struct {
Name string `json:"name"`
Data interface{} `json:"data,omitempty"`
}
BoardWidget specifies widget. Some widgets can contain otter widgets.
func (BoardWidget) Validate ¶
func (v BoardWidget) Validate() (err error)
Validate returns error if failed
type CatalogObject ¶
type CatalogObject struct {
Type string `json:"type"`
Schema string `json:"schema"`
Name string `json:"name"`
DefaultAlias string `json:"defaultAlias,omitempty"`
}
CatalogObject used in list of objects
func (CatalogObject) Validate ¶
func (v CatalogObject) Validate() error
Validate returns error if not valid
type CatalogObjectWithRefs ¶
type CatalogObjectWithRefs struct {
CatalogObject
PrimaryKey *UniqueKey `json:"primaryKey,omitempty"`
ForeignKeys ForeignKeys `json:"foreignKeys,omitempty"`
ReferencedBy TableReferencedBys `json:"referencedBy,omitempty"`
}
CatalogObjectWithRefs defines ref to catalog object
func (CatalogObjectWithRefs) Validate ¶
func (v CatalogObjectWithRefs) Validate() error
Validate returns error if not valid
type CatalogObjects ¶
type CatalogObjects []CatalogObject
CatalogObjects defines list of catalog objects
func (CatalogObjects) Validate ¶
func (v CatalogObjects) Validate() error
Validate returns error if not valid
type CatalogObjectsWithRefs ¶
type CatalogObjectsWithRefs []CatalogObjectWithRefs
CatalogObjectsWithRefs defines slice
func (CatalogObjectsWithRefs) Validate ¶
func (v CatalogObjectsWithRefs) Validate() error
Validate returns error if not valid
type ChangeType ¶
type ChangeType int
ChangeType defines what kind of change performed or to be performed
const ( ChangeTypeUnchanged ChangeType = iota ChangeTypeAdded ChangeTypeAltered ChangeTypeDeleted )
type Changeset ¶
type Changeset struct {
Status string `json:"status"`
Datasets []DatasetDef `json:"datasets"`
}
Changeset holds a set of data changes to be applied
type ChangesetDef ¶
type ChangesetDef struct {
ProjectItem
Datasets []ChangesetRefToDataset `json:"datasets"`
}
ChangesetDef defines a set of changes to be applied
type ChangesetRefToDataset ¶
ChangesetRefToDataset defines a reference to a dataset
type CharacterSet ¶
type CharacterSet struct {
Catalog string `json:"Catalog,omitempty"`
Schema string `json:"Schema,omitempty"`
Name string `json:"ID"`
}
CharacterSet holds info about character set
func (CharacterSet) Validate ¶
func (v CharacterSet) Validate() error
Validate returns error if not valid
type Check ¶
type Check struct {
ID string `json:"id"` // This a random ID uniquely identifying a specific check instance
Title string `json:"title,omitempty"`
Type string `json:"type"`
Data json.RawMessage `json:"data,omitempty"`
}
Check defines a check
type Collation ¶
type Collation struct {
Catalog string `json:"catalog,omitempty"`
Schema string `json:"schema,omitempty"`
Name string `json:"name"`
}
Collation holds info about collation
type ColumnModel ¶
type ColumnModel struct {
TableColumn
ByEnv StateByEnv `json:"byEnv,omitempty"`
Checks Checks `json:"checks,omitempty"`
}
ColumnModel defines column as we expect it to be
func (*ColumnModel) Validate ¶
func (v *ColumnModel) Validate() error
Validate returns error if not valid
type ColumnModels ¶
type ColumnModels []*ColumnModel
ColumnModels is a slice of *ColumnModel
func (ColumnModels) Validate ¶
func (v ColumnModels) Validate() error
Validate returns error if not valid
type Constraint ¶
Constraint defines constraint
func (Constraint) Validate ¶
func (v Constraint) Validate() error
Validate returns error if not valid
type Credentials ¶
type Credentials struct {
Username string `json:"username,omitempty" yaml:"username,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty"`
}
Credentials holds username & password
func (Credentials) Validate ¶
func (v Credentials) Validate() error
Validate returns error if failed
type DatabaseDifferences ¶
type DatabaseDifferences struct {
ID string `json:"id"`
SchemasDiff SchemasDiff `json:"schemasDiff"`
}
DatabaseDifferences holds DB diffs
type DatasetDef ¶
type DatasetDef struct {
Recordsets []RecordsetDefinition `json:"recordsets"`
}
DatasetDef is a set of recordsets
type DatasetRefToRecordset ¶
type DatasetRefToRecordset struct {
MinRecordsCount int `json:"minRecordsCount:omitempty"`
MaxRecordsCount int `json:"maxRecordsCount:omitempty"`
}
DatasetRefToRecordset is a reference from dataset to recordset definition and settings specific for the dataset
type DatatugProject ¶
type DatatugProject struct {
ProjectItem
Created *ProjectCreated `json:"created,omitempty" firestore:"created,omitempty"`
Boards Boards `json:"boards,omitempty" firestore:"boards,omitempty"`
Queries *QueryFolder `json:"queries,omitempty" firestore:"queries,omitempty"`
Entities Entities `json:"entities,omitempty" firestore:"entities,omitempty"`
Environments Environments `json:"environments,omitempty" firestore:"environments,omitempty"`
DbModels DbModels `json:"dbModels,omitempty" firestore:"dbModels,omitempty"`
DbServers ProjDbServers `json:"dbServers,omitempty" firestore:"dbServers,omitempty"`
DbDifferences DatabaseDifferences `json:"dbDifferences,omitempty" firestore:"dbDifferences,omitempty"`
Actions Actions `json:"actions,omitempty" firestore:"actions,omitempty"`
Repository *ProjectRepository `json:"repository,omitempty" firestore:"repository,omitempty"`
}
DatatugProject holds info about project
func (DatatugProject) Validate ¶
func (v DatatugProject) Validate() error
Validate returns error if not valid
type DatatugStoreBrief ¶
type DatatugStoreBrief struct {
Type string `json:"type,omitempty" firestore:"type,omitempty" yaml:"type,omitempty"`
Title string `json:"title,omitempty" firestore:"title,omitempty" yaml:"title,omitempty"`
Projects map[string]ProjectBrief `json:"projects,omitempty" firestore:"projects,omitempty"`
}
DatatugStoreBrief stores info about datatug storage known to a user
func (DatatugStoreBrief) Validate ¶
func (v DatatugStoreBrief) Validate() error
Validate returns error if not valid
type DatatugUser ¶
type DatatugUser struct {
Datatug *UserDatatugInfo `json:"datatug,omitempty" firestore:"datatug,omitempty"`
}
DatatugUser defines a user record with props related to Datatug
func (DatatugUser) Validate ¶
func (v DatatugUser) Validate() error
Validate returns error if not valid
type DbCatalog ¶
type DbCatalog struct {
DbCatalogBase
Schemas DbSchemas
}
DbCatalog hold info about DB database
type DbCatalogBase ¶
type DbCatalogBase struct {
ProjectItem
Driver string `json:"driver"`
Path string `json:"path,omitempty"` // for SQLite
DbModel string `json:"dbModel"`
}
DbCatalogBase defines base data for DB catalog
func (DbCatalogBase) Validate ¶
func (v DbCatalogBase) Validate() error
Validate returns error if not valid
type DbCatalogCounts ¶
type DbCatalogCounts struct {
Schemas int `json:"schemas"`
Tables int `json:"tables"`
Views int `json:"views"`
}
DbCatalogCounts hold numbers about DB
type DbCatalogSummary ¶
type DbCatalogSummary struct {
DbCatalogBase
Environments []string `json:"environments"`
NumberOf *DbCatalogCounts `json:"numberOf"`
}
DbCatalogSummary holds database summary
type DbCatalogs ¶
type DbCatalogs []*DbCatalog
DbCatalogs is a slice of pointers to Database
func (DbCatalogs) GetDbByID ¶
func (v DbCatalogs) GetDbByID(id string) *DbCatalog
GetDbByID returns Database by ID
func (DbCatalogs) GetTable ¶
func (v DbCatalogs) GetTable(catalog, schema, name string) *Table
GetTable returns table
type DbColumnProps ¶
type DbColumnProps struct {
Name string `json:"name"`
OrdinalPosition int `json:"ordinalPosition"`
PrimaryKeyPosition int `json:"pkPosition,omitempty"`
IsNullable bool `json:"isNullable"`
DbType string `json:"dbType"`
Default *string `json:"default,omitempty"`
CharMaxLength *int `json:"charMaxLength,omitempty"`
CharOctetLength *int `json:"charOctetLength,omitempty"`
DateTimePrecision *int `json:"dateTimePrecision,omitempty"`
CharacterSet *CharacterSet `json:"characterSet,omitempty"`
Collation *Collation `json:"collation,omitempty"`
}
DbColumnProps holds column metadata
func (DbColumnProps) Validate ¶
func (v DbColumnProps) Validate() error
Validate returns error if not valid
type DbModel ¶
type DbModel struct {
ProjectItem
Schemas SchemaModels `json:"schemas,omitempty"`
Environments DbModelEnvironments `json:"environments,omitempty"`
}
DbModel holds a model of a database
type DbModelDbCatalog ¶
type DbModelDbCatalog struct {
ID string `json:"id"`
}
DbModelDbCatalog holds DB model
func (DbModelDbCatalog) Validate ¶
func (v DbModelDbCatalog) Validate() error
Validate returns error if not valid
type DbModelDbCatalogs ¶
type DbModelDbCatalogs []*DbModelDbCatalog
DbModelDbCatalogs slice of *DbModelDbCatalog
func (DbModelDbCatalogs) GetByID ¶
func (v DbModelDbCatalogs) GetByID(id string) (dbModelDb *DbModelDbCatalog)
GetByID returns DbModelDbCatalog by ID
func (DbModelDbCatalogs) Validate ¶
func (v DbModelDbCatalogs) Validate() error
Validate returns error if not valid
type DbModelEnv ¶
type DbModelEnv struct {
ID string `json:"id"` // environment ID
DbCatalogs DbModelDbCatalogs
}
DbModelEnv holds links from db model to environments
func (DbModelEnv) Validate ¶
func (v DbModelEnv) Validate() error
Validate returns error if not valid
type DbModelEnvironments ¶
type DbModelEnvironments []*DbModelEnv
DbModelEnvironments slice of *DbModelEnv
func (DbModelEnvironments) GetByID ¶
func (v DbModelEnvironments) GetByID(id string) *DbModelEnv
GetByID return *DbModelEnv by ID
func (DbModelEnvironments) Validate ¶
func (v DbModelEnvironments) Validate() error
Validate returns error if not valid
type DbModels ¶
type DbModels []*DbModel
DbModels is a slice of *DbModel
func (DbModels) GetDbModelByID ¶
GetDbModelByID return DB model by ID
type DbSchema ¶
type DbSchema struct {
ProjectItem
Tables []*Table `json:"tables"`
Views []*Table `json:"views"`
}
DbSchema represents a schema in a database
type DbSchemas ¶
type DbSchemas []*DbSchema
DbSchemas is a slice of *DbSchema
type DiffDbRef ¶
type DiffDbRef struct {
Environment string `json:"env"`
Host string `json:"host"`
Port int `json:"port,omitempty"`
Catalog string `json:"catalog,omitempty"`
}
DiffDbRef is a link to DB
type Entities ¶
type Entities []*Entity
Entities is a slice of *Entity
func (Entities) GetEntityByID ¶
GetEntityByID return an entity by ID
type Entity ¶
type Entity struct {
ProjEntityBrief
ListOfTags
Fields EntityFields `json:"fields,omitempty" firestore:"fields,omitempty"`
Tables TableKeys `json:"tables,omitempty" firestore:"tables,omitempty"`
}
Entity hold full info about entity
type EntityField ¶
type EntityField struct {
ID string `json:"id" firestore:"id"`
Type string `json:"type" firestore:"type"`
Title string `json:"title,omitempty" firestore:"title,omitempty"`
IsKeyField bool `json:"isKeyField,omitempty" firestore:"isKeyField,omitempty"`
NamePatterns StringPatterns `json:"namePatterns" firestore:"namePattern"`
}
EntityField hold info about entity field
func (EntityField) Validate ¶
func (v EntityField) Validate() error
Validate returns error if not valid
type EntityFieldRef ¶
EntityFieldRef holds reference to entity field
func (EntityFieldRef) Validate ¶
func (v EntityFieldRef) Validate() error
Validate returns error if not valid
type EntityFields ¶
type EntityFields []EntityField
EntityFields is a slice of EntityField
func (EntityFields) Validate ¶
func (v EntityFields) Validate() error
Validate returns error if not valid
type EnvDb ¶
type EnvDb struct {
ProjectItem
DbModel string `json:"dbModel"`
Server ServerReference `json:"server"`
}
EnvDb hold info about DB in specific environment
type EnvDbDifference ¶
EnvDbDifference hold diffs for a DB in specific environment
type EnvDbServer ¶
type EnvDbServer struct {
ServerReference
Catalogs []string `json:"catalogs,omitempty"`
}
EnvDbServer holds information about DB server in an environment
func (EnvDbServer) Validate ¶
func (v EnvDbServer) Validate() error
Validate returns error if no valid
type EnvDbServers ¶
type EnvDbServers []*EnvDbServer
EnvDbServers is a slice of *EnvDbServer
func (EnvDbServers) GetByServerRef ¶
func (v EnvDbServers) GetByServerRef(serverRef ServerReference) *EnvDbServer
GetByServerRef returns *EnvDbServer by ID
func (EnvDbServers) Validate ¶
func (v EnvDbServers) Validate() error
Validate returns error of failed
type EnvState ¶
type EnvState struct {
Status string `json:"status"` // Possible values: exists, missing
Differences []EnvDbDifference `json:"differences,omitempty"`
}
EnvState hold state of env
type Environment ¶
type Environment struct {
ProjectItem
DbServers EnvDbServers `json:"dbServers"`
}
Environment holds information about environment
func (Environment) Validate ¶
func (v Environment) Validate() error
Validate returns error if failed
type EnvironmentFile ¶
type EnvironmentFile struct {
ID string `json:"id"`
}
EnvironmentFile some file to be documented
func (EnvironmentFile) Validate ¶
func (v EnvironmentFile) Validate() error
Validate returns error if not valid
type EnvironmentSummary ¶
type EnvironmentSummary struct {
ProjectItem
Servers EnvDbServers `json:"dbServers,omitempty"`
}
EnvironmentSummary holds environment summary
func (EnvironmentSummary) Validate ¶
func (v EnvironmentSummary) Validate() error
Validate returns error if not valid
type Environments ¶
type Environments []*Environment
Environments is a slice of pointers to Environment
func (Environments) GetEnvByID ¶
func (v Environments) GetEnvByID(id string) (environment *Environment)
GetEnvByID returns Environment by ID
func (Environments) Validate ¶
func (v Environments) Validate() error
Validate returns error if failed
type Folder ¶
type Folder struct {
Name string `json:"name,omitempty" firestore:"name,omitempty"` // empty for root folders
Note string `json:"note,omitempty" firestore:"note,omitempty"`
// NumberOf keeps count of all successor objects in all sub-folders
NumberOf map[string]int `json:"numberOf,omitempty" firestore:"numberOf,omitempty"`
}
Folder keeps info about folder
type FolderBrief ¶
type FolderBrief struct {
Title string `json:"title" firestore:"title"`
}
FolderBrief holds brief about a folder item
func (FolderBrief) Validate ¶
func (v FolderBrief) Validate() error
Validate returns error if not valid
type FolderItem ¶
type FolderItem struct {
ID string `json:"id" firestore:"id"`
Title string `json:"title" firestore:"title"`
}
FolderItem holds info about a folder item
func (FolderItem) Validate ¶
func (v FolderItem) Validate() error
Validate returns error if not valid
type ForeignKey ¶
type ForeignKey struct {
Name string `json:"name"`
Columns []string `json:"columns"`
RefTable TableKey `json:"refTable"`
MatchOption string `json:"matchOption,omitempty"` // Document what this?
UpdateRule string `json:"updateRule,omitempty"` // Document what this?
DeleteRule string `json:"deleteRule,omitempty"` // Document what this?
}
ForeignKey holds metadata about foreign key
func (ForeignKey) Validate ¶
func (v ForeignKey) Validate() error
Validate returns error if not valid
type ForeignKeys ¶
type ForeignKeys []*ForeignKey
ForeignKeys define list of foreighn keys
func (ForeignKeys) Validate ¶
func (v ForeignKeys) Validate() error
Validate returns error if not valid
type HTTPHeaderItem ¶
HTTPHeaderItem describes an HTTP header item
func (HTTPHeaderItem) Validate ¶
func (v HTTPHeaderItem) Validate() error
Validate returns error if not valid
type HTTPHeaders ¶
type HTTPHeaders []HTTPHeaderItem
HTTPHeaders is a []HTTPHeaderItem
func (HTTPHeaders) Validate ¶
func (v HTTPHeaders) Validate() error
Validate returns error if not valid
type HTTPRequest ¶
type HTTPRequest struct {
Method string `json:"method"`
URL string `json:"url"`
Protocol string `json:"protocol,omitempty"`
Headers HTTPHeaders `json:"headers,omitempty"`
TimeoutThresholdMs int `json:"timeoutThresholdMs,omitempty"` // in milliseconds
Parameters Parameters `json:"parameters,omitempty"`
Content string `json:"content,omitempty"`
}
HTTPRequest describes an HTTP request
func (HTTPRequest) Validate ¶
func (v HTTPRequest) Validate() error
Validate returns error if not valid
type HTTPWidgetDef ¶
type HTTPWidgetDef struct {
WidgetBase
Request HTTPRequest `json:"request"`
}
HTTPWidgetDef holds info about a widget that makes HTTP requests
func (HTTPWidgetDef) Validate ¶
func (v HTTPWidgetDef) Validate() error
Validate returns error if not valid
type HideRecordsetColIf ¶
type HideRecordsetColIf struct {
Parameters []string `json:"parameters,omitempty"`
}
HideRecordsetColIf defines recordset col if
func (HideRecordsetColIf) Validate ¶
func (v HideRecordsetColIf) Validate() error
Validate returns error if not valid
type HitAndMiss ¶
type HitAndMiss struct {
IsInModel bool `json:"isInModel"`
ExistsIn []DiffDbRef `json:"existsIn"` // points to DatabaseDifferences.DatabaseDiffs[]DatabaseDiff.ID
MissingIn []DiffDbRef `json:"missingIn"`
}
HitAndMiss stores where entity exists and where not
type Index ¶
type Index struct {
Name string `json:"name"`
Type string `json:"type"`
Origin string `json:"origin,omitempty"` // Used by SQLite
Columns []*IndexColumn `json:"columns"`
IsClustered bool `json:"clustered,omitempty"`
IsXML bool `json:"xml,omitempty"`
IsColumnStore bool `json:"columnstore,omitempty"`
IsHash bool `json:"hash,omitempty"`
IsUnique bool `json:"unique,omitempty"`
IsUniqueConstraint bool `json:"uniqueConstraint,omitempty"`
IsPrimaryKey bool `json:"primaryKey,omitempty"`
IsPartial bool `json:"partial,omitempty"`
}
Index holds info about DB table index
type IndexColumn ¶
type IndexColumn struct {
Name string `json:"name"`
IsDescending bool `json:"descending,omitempty"`
IsIncludedColumn bool `json:"included,omitempty"`
}
IndexColumn holds info about a col in a DB table index
type Issues ¶
type Issues struct {
Schema []string `json:"schema,omitempty"`
}
Issues TODO: document what it is for
type ListOfTags ¶
type ListOfTags struct {
Tags []string `json:"tags,omitempty" firestore:"tags,omitempty"`
}
ListOfTags mixing
type OptionsValueCheck ¶
type OptionsValueCheck struct {
Type string `json:"type"`
Options []interface{} `json:"options"`
}
OptionsValueCheck test value is matching one of the available options
func (OptionsValueCheck) Validate ¶
func (v OptionsValueCheck) Validate() error
Validate returns error if not valid
type Parameter ¶
type Parameter struct {
ID string `json:"id"`
Type string `json:"type"`
Value interface{} `json:"value"`
}
Parameter defines parameter
type ParameterDef ¶
type ParameterDef struct {
ID string `json:"id"`
Type string `json:"type"`
Title string `json:"title,omitempty"`
DefaultValue interface{} `json:"defaultValue,omitempty"`
IsRequired bool `json:"isRequired,omitempty"`
IsMultiValue bool `json:"isMultiValue,omitempty"`
MaxLength int `json:"maxLength,omitempty"`
MinLength int `json:"minLength,omitempty"`
Meta *EntityFieldRef `json:"meta,omitempty"`
Lookup *ParameterLookup `json:"lookup,omitempty"`
}
ParameterDef defines input parameter for a board, widget, etc.
func (ParameterDef) Validate ¶
func (v ParameterDef) Validate() error
Validate returns error if failed
type ParameterLookup ¶
type ParameterLookup struct {
DB string `json:"db" firestore:"db"`
SQL string `json:"sql" firestore:"sql"`
KeyFields []string `json:"keyFields" firestore:"keyFields"`
}
ParameterLookup holds definition for parameter lookup
type ProjBoardBrief ¶
type ProjBoardBrief struct {
ProjItemBrief
Parameters Parameters `json:"parameters,omitempty" firestore:"parameters,omitempty"`
// TODO: Document why and how to use, add tests
RequiredParams [][]string `json:"requiredParams,omitempty" firestore:"requiredParams,omitempty"`
}
ProjBoardBrief defines brief information of Board
func (ProjBoardBrief) Validate ¶
func (v ProjBoardBrief) Validate() error
type ProjDbModelBrief ¶
type ProjDbModelBrief struct {
ProjectItem
NumberOf ProjDbModelNumbers `json:"numberOf"`
}
ProjDbModelBrief hold env brief in project summary
type ProjDbModelNumbers ¶
type ProjDbModelNumbers struct {
Schemas int `json:"schemas"`
Tables int `json:"tables"`
Views int `json:"views"`
}
ProjDbModelNumbers holds numbers for a dbmodel
type ProjDbServer ¶
type ProjDbServer struct {
ProjectItem
Server ServerReference `json:"server"`
Catalogs DbCatalogs `json:"catalogs"`
}
ProjDbServer holds info about a project DB server - NOT sure if right way
func (ProjDbServer) Validate ¶
func (v ProjDbServer) Validate() error
Validate returns error if not valid
type ProjDbServerFile ¶
type ProjDbServerFile struct {
ServerReference
Catalogs []string `jsont:"catalogs,omitempty" firestore:"catalogs,omitempty"`
}
ProjDbServerFile stores summary info about ServerReference
func (ProjDbServerFile) Validate ¶
func (v ProjDbServerFile) Validate() error
Validate returns error if not valid
type ProjDbServerSummary ¶
type ProjDbServerSummary struct {
ProjectItem
DbServer ServerReference `json:"dbServer"`
Catalogs []*DbCatalogSummary `json:"databases,omitempty"`
}
ProjDbServerSummary holds summary info about DB server
type ProjDbServers ¶
type ProjDbServers []*ProjDbServer
ProjDbServers slice of ProjDbServer which holds ServerReference and DbCatalogs
func (ProjDbServers) GetProjDbServer ¶
func (v ProjDbServers) GetProjDbServer(ref ServerReference) *ProjDbServer
GetProjDbServer returns db servers
func (ProjDbServers) Validate ¶
func (v ProjDbServers) Validate() error
Validate returns error if not valid
type ProjEntityBrief ¶
type ProjEntityBrief struct {
ProjItemBrief
}
ProjEntityBrief hold brief info about entity in project file
type ProjEnvBrief ¶
type ProjEnvBrief struct {
ProjectItem
}
ProjEnvBrief hold env brief in project summary
type ProjEnvNumbers ¶
ProjEnvNumbers hold some numbers for environment
type ProjItemBrief ¶
type ProjItemBrief struct {
ID string `json:"id,omitempty" firestore:"id,omitempty" yaml:"id,omitempty"`
Title string `json:"title,omitempty" firestore:"title,omitempty" yaml:"title,omitempty"`
Folder string `json:"folder,omitempty" firestore:"folder,omitempty" yaml:"folder,omitempty"`
ListOfTags
}
ProjItemBrief hold a brief about a project item
func (ProjItemBrief) Validate ¶
func (v ProjItemBrief) Validate(isTitleRequired bool) error
Validate returns error if not valid
type ProjectBrief ¶
type ProjectBrief struct {
Access string `json:"access" firestore:"access"` // e.g. private, protected, public
ProjectItem
Repository *ProjectRepository `json:"repository,omitempty" firestore:"repository,omitempty"`
}
ProjectBrief hold project brief info (e.g. for list)
func (*ProjectBrief) Validate ¶
func (v *ProjectBrief) Validate() error
Validate returns error if not valid
type ProjectCreated ¶
type ProjectCreated struct {
//ByName string `json:"byName,omitempty"`
//ByUsername string `json:"byUsername,omitempty"`
At time.Time `json:"at" firestore:"at"`
}
ProjectCreated hold info about when & who created
type ProjectFile ¶
type ProjectFile struct {
Created *ProjectCreated `json:"created,omitempty" firestore:"created,omitempty"`
ProjectItem
Repository *ProjectRepository `json:"repository,omitempty" firestore:"repository,omitempty"`
DbModels []*ProjDbModelBrief `json:"dbModels,omitempty" firestore:"dbModels,omitempty"`
Entities []*ProjEntityBrief `json:"entities,omitempty" firestore:"entities,omitempty"`
Environments []*ProjEnvBrief `json:"environments,omitempty" firestore:"environments,omitempty"`
}
ProjectFile defines what to storage to project file
func (ProjectFile) Validate ¶
func (v ProjectFile) Validate() error
Validate returns error if not valid
type ProjectItem ¶
type ProjectItem struct {
ProjItemBrief
UserIDs []string `json:"userIds,omitempty" firestore:"userIds,omitempty"`
Access string `json:"access,omitempty" firestore:"access,omitempty"` // e.g. "private", "protected", "public"
}
ProjectItem base class with ID and Name
func (ProjectItem) Validate ¶
func (v ProjectItem) Validate(isTitleRequired bool) error
Validate returns error if not valid
type ProjectRepository ¶
type ProjectRepository struct {
Type string `json:"type"` // e.g. "git"
WebURL string `json:"webURL"`
ProjectID string `json:"projectId,omitempty"`
}
ProjectRepository defines project repository
func (*ProjectRepository) Validate ¶
func (v *ProjectRepository) Validate() error
Validate returns error if not valid
type ProjectSummary ¶
type ProjectSummary struct {
ProjectFile
}
ProjectSummary hold project summary - TODO: document why we need it in addition to ProjectFile
type PropertyDiff ¶
type PropertyDiff struct {
Name string `json:"name"`
HitAndMiss
}
PropertyDiff holds diffs about some property
type QueryDef ¶
type QueryDef struct {
ProjectItem
Type string `json:"type"` // Possible value: folder, SQL, GraphQL, HTTP, etc.
Text string `json:"text,omitempty" yaml:"text,omitempty"`
Draft bool `json:"draft,omitempty" yaml:"draft,omitempty"`
Parameters Parameters `json:"parameters,omitempty" yaml:"parameters,omitempty"`
Targets []QueryDefTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
// User might want to now what set of cols is returned even before hitting the RUN button.
Recordsets []RecordsetDefinition `json:"recordsets,omitempty" yaml:"recordsets,omitempty"`
}
QueryDef holds query data For HTTP request host, port, etc, are stored in Targets property,
type QueryDefBrief ¶
type QueryDefBrief struct {
ProjItemBrief
Type string `json:"type"` // Possible value: folder, SQL, GraphQL, etc.
Draft bool `json:"draft,omitempty" yaml:"draft,omitempty"`
}
func (QueryDefBrief) Validate ¶
func (v QueryDefBrief) Validate() error
type QueryDefTarget ¶
type QueryDefTarget struct {
Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
Catalog string `json:"catalog,omitempty" yaml:"catalog,omitempty"`
Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
Host string `json:"host,omitempty" yaml:"host,omitempty"`
Port int `json:"port,omitempty" yaml:"port,omitempty"`
Credentials
}
QueryDefTarget defines target of query
type QueryDefWithFolderPath ¶
QueryDefWithFolderPath adds folder path to query definition
func (QueryDefWithFolderPath) Validate ¶
func (v QueryDefWithFolderPath) Validate() error
Validate returns error if not valid
type QueryFolder ¶
type QueryFolder struct {
ProjectItem
Folders QueryFolders `json:"folders,omitempty" yaml:"folders,omitempty"`
Items QueryDefs `json:"items,omitempty" yaml:"items,omitempty"`
}
QueryFolder defines folder
func (QueryFolder) Validate ¶
func (v QueryFolder) Validate() error
Validate returns error if not valid
type QueryFolderBrief ¶
type QueryFolderBrief struct {
ProjItemBrief
Folders []*QueryFolderBrief `json:"folders,omitempty" yaml:"folders,omitempty"`
Items []*QueryDefBrief `json:"items,omitempty" yaml:"items,omitempty"`
}
QueryFolderBrief defines brief for queries folder
func (QueryFolderBrief) Validate ¶
func (v QueryFolderBrief) Validate() error
Validate returns error if not valid
type QueryFolders ¶
type QueryFolders []*QueryFolder
QueryFolders defines slice
func (QueryFolders) Validate ¶
func (v QueryFolders) Validate() error
Validate returns error if not valid
type QueryResult ¶
type QueryResult struct {
Created time.Time `json:"created"`
EnvironmentID string `json:"env"`
Driver string `json:"driver"`
Target string `json:"target"`
Recordsets []Recordset `json:"recordset,omitempty"`
}
QueryResult holds results of a query execution
func (QueryResult) Validate ¶
func (v QueryResult) Validate() error
Validate returns error if not valid
type ReadmeEncoder ¶
type ReadmeEncoder interface {
ProjectSummaryToReadme(w io.Writer, project DatatugProject) error
DbServerToReadme(w io.Writer, repository *ProjectRepository, dbServer ProjDbServer) error
TableToReadme(w io.Writer, repository *ProjectRepository, catalog string, table *Table, dbServer ProjDbServer) error
DbCatalogToReadme(w io.Writer, repository *ProjectRepository, dbServer ProjDbServer, catalog DbCatalog) error
}
ReadmeEncoder defines an interface for encoder implementation that writes to MD files
type Recordset ¶
type Recordset struct {
Duration time.Duration `json:"durationNanoseconds"`
Columns []RecordsetColumn `json:"columns"`
Rows [][]interface{} `json:"rows"`
}
Recordset holds data & stats for recordset returned by executed command
type RecordsetBaseDef ¶
type RecordsetBaseDef struct {
PrimaryKey *UniqueKey `json:"primaryKey,omitempty"`
ForeignKeys ForeignKeys `json:"foreignKeys,omitempty"`
AlternateKeys []UniqueKey `json:"alternateKey,omitempty"`
ActiveIssues *Issues `json:"issues,omitempty"`
}
RecordsetBaseDef is used by: Table, RecordsetDefinition
type RecordsetColumn ¶
type RecordsetColumn struct {
Name string `json:"name"`
DbType string `json:"dbType"`
Meta *EntityFieldRef `json:"meta"`
}
RecordsetColumn describes column in a recordset
func (RecordsetColumn) Validate ¶
func (v RecordsetColumn) Validate() error
Validate returns error if not valid
type RecordsetColumnDef ¶
type RecordsetColumnDef struct {
Name string `json:"name"`
Type string `json:"type"`
Required bool `json:"required,omitempty"`
Meta *EntityFieldRef `json:"meta,omitempty"`
HideIf HideRecordsetColIf `json:"hideIf,omitempty"`
}
RecordsetColumnDef defines a column of a recordset
func (RecordsetColumnDef) Validate ¶
func (v RecordsetColumnDef) Validate() error
Validate returns error if not valid
type RecordsetColumnDefs ¶
type RecordsetColumnDefs []RecordsetColumnDef
RecordsetColumnDefs is a slice of RecordsetColumnDef
func (RecordsetColumnDefs) HasColumn ¶
func (v RecordsetColumnDefs) HasColumn(name string, caseSensitive bool) bool
HasColumn checks if set of columns has a column with a given name
func (RecordsetColumnDefs) Validate ¶
func (v RecordsetColumnDefs) Validate() error
Validate returns error if not valid
type RecordsetDefinition ¶
type RecordsetDefinition struct {
ProjectItem
RecordsetBaseDef
Columns RecordsetColumnDefs `json:"columns,omitempty" yaml:"columns,omitempty"`
// -- formatting spacer --
Type string `json:"type" yaml:"type,omitempty"` // Supported types: "recordset", "json"
JSONSchema string `json:"jsonSchema,omitempty" yaml:"jsonSchema,omitempty"`
Files []string `json:"files,omitempty" yaml:"files,omitempty"`
Errors []string `json:"errors,omitempty"`
}
RecordsetDefinition describes dataset
func (RecordsetDefinition) Validate ¶
func (v RecordsetDefinition) Validate() error
Validate returns error if not valid
type RefByForeignKey ¶
type RefByForeignKey struct {
Name string `json:"name"`
Columns []string `json:"columns"`
MatchOption string `json:"matchOption,omitempty"`
UpdateRule string `json:"updateRule,omitempty"`
DeleteRule string `json:"deleteRule,omitempty"`
}
RefByForeignKey holds metadata about reference by FK
type RegexpValueCheck ¶
type RegexpValueCheck struct {
Regexp string `json:"regexp"`
}
RegexpValueCheck test value with regular expression
func (RegexpValueCheck) Validate ¶
func (v RegexpValueCheck) Validate() error
Validate returns error if not valid
type SQLCheck ¶
type SQLCheck struct {
Query string `json:"query"`
}
SQLCheck holds and SQL that verifies data
type SQLWidgetDef ¶
type SQLWidgetDef struct {
WidgetBase
SQL SQLWidgetSettings `json:"sql"`
}
SQLWidgetDef holds info about a widget that makes SQL queries
func (*SQLWidgetDef) Validate ¶
func (v *SQLWidgetDef) Validate() error
Validate returns error if not valid
type SQLWidgetSettings ¶
type SQLWidgetSettings struct {
Query string `json:"query"`
}
SQLWidgetSettings holds settings for an SQL widget
func (SQLWidgetSettings) Validate ¶
func (v SQLWidgetSettings) Validate() error
Validate returns error if not valid
type SchemaDiff ¶
type SchemaDiff struct {
HitAndMiss
TablesDiff TablesDiff `json:"tablesDiff"`
ViewsDiff TablesDiff `json:"viewsDiff"`
}
SchemaDiff holds schema diffs
type SchemaModel ¶
type SchemaModel struct {
ProjectItem
Tables TableModels `json:"tables"`
Views TableModels `json:"views"`
}
SchemaModel holds model for a DB schema
func (SchemaModel) Validate ¶
func (v SchemaModel) Validate() error
Validate returns error if not valid
type SchemaModels ¶
type SchemaModels []*SchemaModel
SchemaModels is a slice of *SchemaModel
func (SchemaModels) GetByID ¶
func (v SchemaModels) GetByID(id string) (schemaModel *SchemaModel)
GetByID return *SchemaModel by ID
type ServerReference ¶
type ServerReference struct {
Driver string `json:"driver"`
Host string `json:"host"`
Port int `json:"port,omitempty"`
}
ServerReference hold info about DB server
func NewDbServer ¶
func NewDbServer(driver, hostWithOptionalPort, sep string) (dbServer ServerReference, err error)
NewDbServer creates ServerReference
func (ServerReference) Address ¶
func (v ServerReference) Address() string
Address returns a "host:port" string
func (ServerReference) FileName ¶
func (v ServerReference) FileName() string
FileName returns a name for a file (probably should be moved to a func in filestore package)
func (ServerReference) ID ¶
func (v ServerReference) ID() string
ID returns string key for the server
func (ServerReference) Validate ¶
func (v ServerReference) Validate() error
Validate returns error if not valid
type ServerReferences ¶
type ServerReferences []ServerReference
ServerReferences defines slice
func (ServerReferences) Validate ¶
func (v ServerReferences) Validate() error
Validate returns error if not valid
type StateByEnv ¶
StateByEnv states by env ID
func (StateByEnv) Validate ¶
func (v StateByEnv) Validate() error
Validate returns error if not valid
type StringPattern ¶
type StringPattern struct {
Type string `json:"type,omitempty"` // Options: regexp, exact
Value string `json:"value,omitempty"`
CaseSensitive bool `json:"caseSensitive,omitempty"`
}
StringPattern hold patterns for names
func (StringPattern) Validate ¶
func (v StringPattern) Validate() error
Validate returns error if not valid
type StringPatterns ¶
type StringPatterns []*StringPattern
StringPatterns is a slice of *StringPattern
func (StringPatterns) Validate ¶
func (v StringPatterns) Validate() error
Validate returns error if not valid
type TabWidget ¶
type TabWidget struct {
Title string `json:"title"`
Widget BoardWidget `json:"widget,omitempty"`
}
TabWidget describes a tab widget
type Table ¶
type Table struct {
RecordsetBaseDef
TableKey
TableProps
SQL string `json:"sql,omitempty"`
Columns TableColumns `json:"columns,omitempty"`
Indexes []*Index `json:"indexes,omitempty"`
ReferencedBy TableReferencedBys `json:"referencedBy,omitempty"`
RecordsCount *int `json:"recordsCount,omitempty"`
}
Table holds metadata about a table or view
type TableColumn ¶
type TableColumn struct {
DbColumnProps
//ChangeType ChangeType `json:"-"` // Document what it is and why needed
//ByEnv map[string]TableColumn `json:"byEnv,omitempty"`
Constraints []string `json:"constraints,omitempty"`
}
TableColumn holds col metadata
func (TableColumn) Validate ¶
func (v TableColumn) Validate() error
Validate returns error if not valid
type TableColumns ¶
type TableColumns []*TableColumn
TableColumns defines slice
func (TableColumns) ByPrimaryKeyPosition ¶
func (v TableColumns) ByPrimaryKeyPosition() sort.Interface
ByPrimaryKeyPosition returns sort interface
func (TableColumns) Validate ¶
func (v TableColumns) Validate() error
Validate returns error if not valid
type TableDiff ¶
type TableDiff struct {
HitAndMiss
ColumnsDiff ColumnsDiff `json:"columnsDiff"`
}
TableDiff holds table diffs
type TableKey ¶
type TableKey struct {
Name string `json:"name"`
Schema string `json:"schema,omitempty"`
Catalog string `json:"catalog,omitempty"`
}
TableKey defines a key that identifies a table or a view
type TableModel ¶
type TableModel struct {
TableKey
DbType string `json:"dbType,omitempty"` // e.g. "BASE TABLE", "VIEW", etc.
Columns ColumnModels
Checks Checks `json:"checks,omitempty"` // References to checks by type/id
ByEnv StateByEnv `json:"byEnv,omitempty"`
}
TableModel hold models for table or view
func (*TableModel) String ¶
func (v *TableModel) String() string
func (*TableModel) Validate ¶
func (v *TableModel) Validate() error
Validate returns error if not valid
type TableModels ¶
type TableModels []*TableModel
TableModels is a slice of *TableModel
func (TableModels) GetByKey ¶
func (v TableModels) GetByKey(k TableKey) *TableModel
GetByKey returns table by key (name, schema, catalog)
func (TableModels) GetByName ¶
func (v TableModels) GetByName(name string) *TableModel
GetByName returns table by name
type TableProps ¶
type TableProps struct {
DbType string `json:"dbType,omitempty"` // e.g. "BASE TABLE", "VIEW", etc.
UniqueKeys []*UniqueKey `json:"uniqueKeys,omitempty"`
}
TableProps holds properties of a table
func (TableProps) Validate ¶
func (v TableProps) Validate() error
Validate returns error if not valid
type TableReferencedBy ¶
type TableReferencedBy struct {
TableKey
ForeignKeys []*RefByForeignKey `json:"foreignKeys"`
}
TableReferencedBy holds metadata about table/view that reference a table/view
type TableReferencedBys ¶
type TableReferencedBys []*TableReferencedBy
TableReferencedBys defines slice
func (TableReferencedBys) Validate ¶
func (v TableReferencedBys) Validate() error
Validate returns error if not valid
type TabsWidgetDef ¶
type TabsWidgetDef struct {
WidgetBase
Tabs []TabWidget `json:"tabs"`
}
TabsWidgetDef describes set of tab widgets
func (TabsWidgetDef) Validate ¶
func (v TabsWidgetDef) Validate() error
Validate returns error if not valid
type UniqueKey ¶
type UniqueKey struct {
Name string `json:"name"`
Columns []string `json:"columns"`
IsClustered bool `json:"isClustered,omitempty"`
}
UniqueKey holds metadata about unique key
type UniqueKeys ¶
type UniqueKeys []UniqueKey
UniqueKeys defines slice
func (UniqueKeys) Validate ¶
func (v UniqueKeys) Validate() error
Validate returns error if not valid
type UserDatatugInfo ¶
type UserDatatugInfo struct {
Stores map[string]DatatugStoreBrief `json:"stores,omitempty" firestore:"stores,omitempty"`
}
UserDatatugInfo holds user info for DataTug project
func (UserDatatugInfo) Validate ¶
func (v UserDatatugInfo) Validate() error
Validate returns error if not valid
type ValueRegexCheck ¶
type ValueRegexCheck struct {
Regex string `json:"regex"`
}
ValueRegexCheck holds regex to check
type VarInfo ¶
type VarInfo struct {
Type string `json:"type" firestore:"type"`
Value string `json:"value,omitempty" firestore:"value,omitempty"`
}
VarInfo hold info about var type & value
type VarSetting ¶
type VarSetting struct {
Type string `json:"type" firestore:"type"`
ValuePattern string `json:"valuePattern,omitempty" firestore:"valuePattern,omitempty"`
Min *int `json:"min,omitempty" firestore:"min,omitempty"`
Max *int `json:"max,omitempty" firestore:"max,omitempty"`
}
VarSetting record
type Variables ¶
type Variables struct {
Vars map[string]VarInfo `json:"vars,omitempty" firestore:"vars,omitempty"`
}
Variables properties holder
type WidgetBase ¶
type WidgetBase struct {
Title string `json:"title,omitempty"`
Parameters Parameters `json:"parameters,omitempty"`
}
WidgetBase is base struct for widgets
func (WidgetBase) Validate ¶
func (v WidgetBase) Validate(isTitleRequired bool) error
Validate returns error if not valid
Source Files
¶
- api_catalog.go
- boards.go
- change_type.go
- changeset.go
- checks.go
- columns.go
- credentials.go
- datasets.go
- db_model.go
- db_objects.go
- dbcatalog.go
- diffs.go
- encoder.go
- entities.go
- env_server.go
- environment.go
- errors.go
- folder.go
- helpers.go
- interfaces.go
- models.go
- parameters.go
- project.go
- project_item.go
- query.go
- recordset.go
- scripts.go
- server.go
- tag.go
- types.go
- user.go
- vairables.go