Documentation ¶
Index ¶
- func MigrateModels()
- type Function
- func (f *Function) Delete() (*Function, error)
- func (f *Function) FindById() (functions []Function, err error)
- func (f *Function) FindByName(module *Module) (functions []Function, err error)
- func (f *Function) FindByPath(module *Module) (functions []Function, err error)
- func (f *Function) Save(module *Module) (*Function, error)
- func (f *Function) Update() (*Function, error)
- type Module
- func (m *Module) Delete() (*Module, error)
- func (m *Module) FindById() (modules []Module, err error)
- func (m *Module) FindByName(project *Project) (modules []Module, err error)
- func (m *Module) FindByPath() (modules []Module, err error)
- func (m *Module) Save(project *Project) (*Module, error)
- func (m *Module) Update() (*Module, error)
- type Project
- type Todo
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateModels ¶
func MigrateModels()
MigrateModels: Use gorm to make database.Database necessary migrations.
Types ¶
type Function ¶
type Function struct { gorm.Model Name string `gorm:"size:255;not null" json:"name"` Path string `gorm:"size:255;not null;unique" json:"path"` ModuleID uint }
func ListFunctions ¶
ListFunctions: Return list of all Function from database.Database with associated Module ID..
func (*Function) FindById ¶
FindById: Search for given Function ID in database.Database with associated Module ID.
func (*Function) FindByName ¶
FindByName: Search for given Function.Name in database.Database with associated Module ID.
func (*Function) FindByPath ¶
FindByPath: Search for given Function.Path in database.Database with associated Module ID.
type Module ¶
type Module struct { gorm.Model Name string `gorm:"size:255;not null" json:"name"` Path string `gorm:"size:255;not null;unique" json:"path"` ProjectID uint Functions []Function `json:"functions"` Types []Type `json:"types"` }
Module: Typedef for Module model.
func ListModules ¶
ListModules: Return list of all Module from database.Database with associated Project ID..
func (*Module) FindById ¶
FindById: Search for given Module ID in database.Database with associated Module ID.
func (*Module) FindByName ¶
FindByName: Search for given Module.Name in database.Database with associated Project ID.
func (*Module) FindByPath ¶
FindByPath: Search for given Module.Path in database.Database with associated Module Path.
type Project ¶
type Project struct { gorm.Model // gorm.Model: Name string `gorm:"size:255;not null" json:"name"` // Name: name of the Project Path string `gorm:"size:255;not null;unique" json:"path"` // Path: Path of the Project Modules []Module `json:"modules"` // Modules: List of Project's related Module Todos []Todo `json:"todo"` // Todos: List of Project's related Todo }
Project: Typedef for Project model in database.Database
func ListProjects ¶
ListProjects: Return list of all Project from database.Database
func (*Project) FindById ¶
FindById: Search for list of Project in database.Database with Project ID
func (*Project) FindByName ¶
FindByName: Search for list of Project in database.Database with Project.Name
func (*Project) FindByPath ¶
FindByPath: Search for list of Project in database.Database with Project.Path