Documentation ¶
Index ¶
- func NewGroupID(isDefault bool) string
- type Association
- type AssociationType
- type AttributeInterface
- type Classification
- type Factory
- type FieldValid
- func (f *FieldValid) Valid(kit *rest.Kit, data mapstr.MapStr, fieldID string) (string, error)
- func (f *FieldValid) ValidID(kit *rest.Kit, value string) error
- func (f *FieldValid) ValidName(kit *rest.Kit, value string) error
- func (f *FieldValid) ValidNameWithRegex(kit *rest.Kit, value string) error
- func (f *FieldValid) ValidPlaceHolder(kit *rest.Kit, value string) error
- type GroupInterface
- type Object
- type ObjectAssoPair
- type Operation
- type Topo
- type Unique
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGroupID ¶
Types ¶
type Association ¶
type Association interface { Operation Parse(data mapstr.MapStr) (*metadata.Association, error) GetType() AssociationType SetTopo(parent, child Object) error GetTopo(obj Object) (Topo, error) ToMapStr() (mapstr.MapStr, error) }
Association association operation interface declaration
type AssociationType ¶
type AssociationType string
AssociationType the association type
const ( // MainLineAssociation the main line association MainLineAssociation AssociationType = "mainline" // CommonAssociation the common association CommonAssociation AssociationType = "commonasso" )
type AttributeInterface ¶
type AttributeInterface interface { Operation Parse(data mapstr.MapStr) error Attribute() *metadata.Attribute SetAttribute(attr metadata.Attribute) IsMainlineField() bool ToMapStr() (mapstr.MapStr, error) }
Attribute attribute opeartion interface declaration
func CreateAttribute ¶
func CreateAttribute(kit *rest.Kit, clientSet apimachinery.ClientSetInterface, attrItems []metadata.Attribute) []AttributeInterface
CreateAttribute create attribute objects
type Classification ¶
type Classification interface { Operation Parse(data mapstr.MapStr) (*metadata.Classification, error) GetObjects() ([]Object, error) Classify() metadata.Classification ToMapStr() mapstr.MapStr }
Classification classification operation interface declaration
func CreateClassification ¶
func CreateClassification(kit *rest.Kit, clientSet apimachinery.ClientSetInterface, clsItems []metadata.Classification) []Classification
CreateClassification create classification objects
type Factory ¶
type Factory interface { CreateObject(kit *rest.Kit) Object CreateClassification(kit *rest.Kit) Classification CreateAttribute(kit *rest.Kit) AttributeInterface CreateGroup(kit *rest.Kit, bizID int64) GroupInterface CreateCommonAssociation(kit *rest.Kit, obj Object, asstKey string, asstObj Object) Association CreateMainLineAssociation(kit *rest.Kit, obj Object, asstKey string, asstObj Object) Association }
Factory used to create object classification attribute etd.
func New ¶
func New(clientSet apimachinery.ClientSetInterface, languageIf language.CCLanguageIf) Factory
New create a new model factory instance
type FieldValid ¶
type FieldValid struct {
// contains filtered or unexported fields
}
FieldValid field valid method
func (*FieldValid) ValidID ¶
func (f *FieldValid) ValidID(kit *rest.Kit, value string) error
ValidID check the property ID
func (*FieldValid) ValidName ¶
func (f *FieldValid) ValidName(kit *rest.Kit, value string) error
ValidName check the name
func (*FieldValid) ValidNameWithRegex ¶
func (f *FieldValid) ValidNameWithRegex(kit *rest.Kit, value string) error
ValidNameWithRegex valid by regex
func (*FieldValid) ValidPlaceHolder ¶
func (f *FieldValid) ValidPlaceHolder(kit *rest.Kit, value string) error
ValidPlaceHolder check the PlaceHolder
type GroupInterface ¶
type GroupInterface interface { Operation Parse(data mapstr.MapStr) (*metadata.Group, error) CreateAttribute() AttributeInterface GetAttributes() ([]AttributeInterface, error) Group() metadata.Group SetGroup(grp metadata.Group) ToMapStr() mapstr.MapStr }
Group group opeartion interface declaration
func CreateGroup ¶
func CreateGroup(kit *rest.Kit, clientSet apimachinery.ClientSetInterface, groupItems []metadata.Group) []GroupInterface
CreateGroup create group objects
func NewGroup ¶
func NewGroup(param *rest.Kit, cli apimachinery.ClientSetInterface, bizID int64) GroupInterface
type Object ¶
type Object interface { Operation Parse(data mapstr.MapStr) error Object() meta.Object IsMainlineObject() (bool, error) IsCommon() bool SetRecordID(id int64) GetMainlineParentObject() (Object, error) GetMainlineChildObject() (Object, error) GetSetObject() (Object, error) GetParentObject() ([]ObjectAssoPair, error) GetChildObject() ([]ObjectAssoPair, error) SetMainlineParentObject(objID string) error CreateMainlineObjectAssociation(relateToObjID string) error CreateGroup(bizID int64) GroupInterface CreateAttribute() AttributeInterface GetGroups() ([]GroupInterface, error) GetAttributes() ([]AttributeInterface, error) GetNonInnerAttributes() ([]AttributeInterface, error) CreateUnique() Unique GetUniques() ([]Unique, error) SetClassification(class Classification) GetClassification() (Classification, error) SetSupplierAccount(supplierAccount string) GetSupplierAccount() string ToMapStr() mapstr.MapStr GetInstIDFieldName() string GetInstNameFieldName() string GetDefaultInstPropertyName() string GetObjectType() string GetObjectID() string }
Object model operation interface declaration
func CreateObject ¶
func CreateObject(kit *rest.Kit, clientSet apimachinery.ClientSetInterface, objItems []metadata.Object) []Object
CreateObject create objects
type ObjectAssoPair ¶
type ObjectAssoPair struct { Object Object Association metadata.Association }
type Operation ¶
type Operation interface { IsExists() (bool, error) Create() error Update(data mapstr.MapStr) error Save(data mapstr.MapStr) error }
Operation the saver interface method
type Unique ¶
type Unique interface { Operation Origin() metadata.ObjectUnique SetKeys([]metadata.UniqueKey) GetKeys() []metadata.UniqueKey SetMustCheck(bool) GetMustCheck() bool SetObjectID(objID string) GetObjectID() string SetSupplierAccount(supplierAccount string) GetSupplierAccount() string SetIsPre(isPre bool) GetIsPre() bool SetRecordID(uint64) GetRecordID() uint64 }
Unique group opeartion interface declaration