model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Yes = "Y"
)

Variables

This section is empty.

Functions

func AddErrorLogItem

func AddErrorLogItem(e ErrorLogItem) error

func AddLogItem

func AddLogItem(l LogItem) error

func AddLogItems

func AddLogItems(ls []LogItem) error

func AddSchedule

func AddSchedule(item Schedule) error

func AddTask

func AddTask(item Task) error

func DeleteTokenById

func DeleteTokenById(id bson.ObjectId) error

func GetActionListTotal

func GetActionListTotal(filter interface{}) (int, error)

func GetChallengeListTotal

func GetChallengeListTotal(filter interface{}) (int, error)

func GetConfigSpiderData

func GetConfigSpiderData(spider Spider) (entity.ConfigSpiderData, error)

获取爬虫定时任务

func GetExecutables

func GetExecutables() (executables []entity.Executable, err error)

func GetLocalLog

func GetLocalLog(logPath string) (fileBytes []byte, err error)

获取本地日志

func GetLocalSystemInfo

func GetLocalSystemInfo() (sysInfo entity.SystemInfo, err error)

func GetLogItemTotal

func GetLogItemTotal(query bson.M, keyword string) (int, error)

func GetNodeCount

func GetNodeCount(query interface{}) (int, error)

节点数

func GetPathValues

func GetPathValues() (paths []string)

func GetProjectCount

func GetProjectCount(filter interface{}) (int, error)

func GetProjectListTotal

func GetProjectListTotal(filter interface{}) (int, error)

func GetRawSetting

func GetRawSetting(keyword string, pointer interface{}) error

func GetScheduleCount

func GetScheduleCount(filter interface{}) (int, error)

func GetSpiderCount

func GetSpiderCount(filter interface{}) (int, error)

获取爬虫总数

func GetSystemEnv

func GetSystemEnv(key string) string

func GetTaskCount

func GetTaskCount(query interface{}) (int, error)

task 总数

func GetTaskListTotal

func GetTaskListTotal(filter interface{}) (int, error)

func GetUserListTotal

func GetUserListTotal(filter interface{}) (int, error)

func GetVisitDays

func GetVisitDays(uid bson.ObjectId) (int, error)

func IsMaster

func IsMaster() bool

当前节点是否为主节点

func RemoveAction

func RemoveAction(id bson.ObjectId) error

func RemoveAllSpider

func RemoveAllSpider() error

删除所有爬虫

func RemoveFile

func RemoveFile(path string) error

func RemoveProject

func RemoveProject(id bson.ObjectId) error

func RemoveSchedule

func RemoveSchedule(id bson.ObjectId) error

func RemoveSpider

func RemoveSpider(id bson.ObjectId) error

删除爬虫

func RemoveTask

func RemoveTask(id string) error

func RemoveTaskBySpiderId

func RemoveTaskBySpiderId(id bson.ObjectId) error

删除task by spider_id

func RemoveTaskByStatus

func RemoveTaskByStatus(status string) error

func RemoveUser

func RemoveUser(id bson.ObjectId) error

func ResetNodeStatusToOffline

func ResetNodeStatusToOffline(list []string)

根据redis的key值,重置node节点为offline

func UpdateAction

func UpdateAction(id bson.ObjectId, item Action) error

func UpdateErrorLogCount

func UpdateErrorLogCount(id string) (err error)

update error log count

func UpdateMasterNodeInfo

func UpdateMasterNodeInfo(key string, ip string, mac string, hostname string) error

func UpdateNode

func UpdateNode(id bson.ObjectId, item Node) error

更新节点

func UpdateProject

func UpdateProject(id bson.ObjectId, item Project) error

func UpdateSchedule

func UpdateSchedule(id bson.ObjectId, item Schedule) error

func UpdateSpider

func UpdateSpider(id bson.ObjectId, item Spider) error

更新爬虫

func UpdateTaskErrorLogs

func UpdateTaskErrorLogs(taskId string, errorRegexPattern string) error

update task error logs

func UpdateTaskResultCount

func UpdateTaskResultCount(id string) (err error)

更新task的结果数

func UpdateTaskToAbnormal

func UpdateTaskToAbnormal(nodeId bson.ObjectId) error

convert all running tasks to abnormal tasks

func UpdateUser

func UpdateUser(id bson.ObjectId, item User) error

Types

type Action

type Action struct {
	Id     bson.ObjectId `json:"_id" bson:"_id"`
	UserId bson.ObjectId `json:"user_id" bson:"user_id"`
	Type   string        `json:"type" bson:"type"`

	CreateTs time.Time `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
}

func GetAction

func GetAction(id bson.ObjectId) (Action, error)

func GetActionList

func GetActionList(filter interface{}, skip int, limit int, sortKey string) ([]Action, error)

func (*Action) Add

func (a *Action) Add() error

func (*Action) Save

func (a *Action) Save() error

type Base

type Base struct {
}

func (*Base) Delete

func (b *Base) Delete() error

func (*Base) Save

func (b *Base) Save() error

type Challenge

type Challenge struct {
	Id            bson.ObjectId `json:"_id" bson:"_id"`
	Name          string        `json:"name" bson:"name"`
	TitleCn       string        `json:"title_cn" bson:"title_cn"`
	TitleEn       string        `json:"title_en" bson:"title_en"`
	DescriptionCn string        `json:"description_cn" bson:"description_cn"`
	DescriptionEn string        `json:"description_en" bson:"description_en"`
	Difficulty    int           `json:"difficulty" bson:"difficulty"`
	Path          string        `json:"path" bson:"path"`

	// 前端展示
	Achieved bool `json:"achieved" bson:"achieved"`

	CreateTs time.Time `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
}

func GetChallenge

func GetChallenge(id bson.ObjectId) (Challenge, error)

func GetChallengeByName

func GetChallengeByName(name string) (Challenge, error)

func GetChallengeList

func GetChallengeList(filter interface{}, skip int, limit int, sortKey string) ([]Challenge, error)

func GetChallengeListWithAchieved

func GetChallengeListWithAchieved(filter interface{}, skip int, limit int, sortKey string, uid bson.ObjectId) ([]Challenge, error)

func (*Challenge) Add

func (ch *Challenge) Add() error

func (*Challenge) Save

func (ch *Challenge) Save() error

type ChallengeAchievement

type ChallengeAchievement struct {
	Id          bson.ObjectId `json:"_id" bson:"_id"`
	ChallengeId bson.ObjectId `json:"challenge_id" bson:"challenge_id"`
	UserId      bson.ObjectId `json:"user_id" bson:"user_id"`

	CreateTs time.Time `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
}

func GetChallengeAchievementList

func GetChallengeAchievementList(filter interface{}, skip int, limit int, sortKey string) ([]ChallengeAchievement, error)

func (*ChallengeAchievement) Add

func (ca *ChallengeAchievement) Add() error

func (*ChallengeAchievement) Save

func (ca *ChallengeAchievement) Save() error

type DocumentMeta

type DocumentMeta struct {
	DocumentVersion  int
	DocStructVersion int
	UpdateTime       time.Time
	CreateTime       time.Time
	DeleteTime       time.Time
}

type Env

type Env struct {
	Name  string `json:"name" bson:"name"`
	Value string `json:"value" bson:"value"`
}

type ErrorLogItem

type ErrorLogItem struct {
	Id       bson.ObjectId `json:"_id" bson:"_id"`
	TaskId   string        `json:"task_id" bson:"task_id"`
	Message  string        `json:"msg" bson:"msg"`
	LogId    bson.ObjectId `json:"log_id" bson:"log_id"`
	Seq      int64         `json:"seq" bson:"seq"`
	Ts       time.Time     `json:"ts" bson:"ts"`
	ExpireTs time.Time     `json:"expire_ts" bson:"expire_ts"`
}

type File

type File struct {
	Name         string `json:"name"`
	Path         string `json:"path"`
	RelativePath string `json:"relative_path"`
	IsDir        bool   `json:"is_dir"`
	Size         int64  `json:"size"`
	Children     []File `json:"children"`
	Label        string `json:"label"`
}

type GridFs

type GridFs struct {
	Id         bson.ObjectId `json:"_id" bson:"_id"`
	ChunkSize  int32         `json:"chunk_size" bson:"chunkSize"`
	UploadDate time.Time     `json:"upload_date" bson:"uploadDate"`
	Length     int32         `json:"length" bson:"length"`
	Md5        string        `json:"md_5" bson:"md5"`
	Filename   string        `json:"filename" bson:"filename"`
}

func GetAllGridFs

func GetAllGridFs() []*GridFs

func GetGridFs

func GetGridFs(id bson.ObjectId) *GridFs

func (*GridFs) Remove

func (f *GridFs) Remove()

type LogItem

type LogItem struct {
	Id       bson.ObjectId `json:"_id" bson:"_id"`
	Message  string        `json:"msg" bson:"msg"`
	TaskId   string        `json:"task_id" bson:"task_id"`
	Seq      int64         `json:"seq" bson:"seq"`
	Ts       time.Time     `json:"ts" bson:"ts"`
	ExpireTs time.Time     `json:"expire_ts" bson:"expire_ts"`
}

func GetLogItemList

func GetLogItemList(query bson.M, keyword string, skip int, limit int, sortStr string) ([]LogItem, error)

type Node

type Node struct {
	Id          bson.ObjectId `json:"_id" bson:"_id"`
	Name        string        `json:"name" bson:"name"`
	Status      string        `json:"status" bson:"status"`
	Ip          string        `json:"ip" bson:"ip"`
	Port        string        `json:"port" bson:"port"`
	Mac         string        `json:"mac" bson:"mac"`
	Hostname    string        `json:"hostname" bson:"hostname"`
	Description string        `json:"description" bson:"description"`
	// 用于唯一标识节点,可能是mac地址,可能是ip地址
	Key string `json:"key" bson:"key"`

	// 前端展示
	IsMaster bool `json:"is_master" bson:"is_master"`

	UpdateTs     time.Time `json:"update_ts" bson:"update_ts"`
	CreateTs     time.Time `json:"create_ts" bson:"create_ts"`
	UpdateTsUnix int64     `json:"update_ts_unix" bson:"update_ts_unix"`
}

func GetNode

func GetNode(id bson.ObjectId) (Node, error)

节点信息

func GetNodeByKey

func GetNodeByKey(key string) (Node, error)

节点信息

func GetNodeList

func GetNodeList(filter interface{}) ([]Node, error)

节点列表

func (*Node) Add

func (n *Node) Add() error

func (*Node) Delete

func (n *Node) Delete() error

func (*Node) GetTasks

func (n *Node) GetTasks() ([]Task, error)

func (*Node) Save

func (n *Node) Save() error

type Project

type Project struct {
	Id          bson.ObjectId `json:"_id" bson:"_id"`
	Name        string        `json:"name" bson:"name"`
	Description string        `json:"description" bson:"description"`
	Tags        []string      `json:"tags" bson:"tags"`

	// 前端展示
	Spiders  []Spider `json:"spiders" bson:"spiders"`
	Username string   `json:"username" bson:"username"`

	UserId   bson.ObjectId `json:"user_id" bson:"user_id"`
	CreateTs time.Time     `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time     `json:"update_ts" bson:"update_ts"`
}

func GetProject

func GetProject(id bson.ObjectId) (Project, error)

func GetProjectList

func GetProjectList(filter interface{}, sortKey string) ([]Project, error)

func (*Project) Add

func (p *Project) Add() error

func (*Project) GetSpiders

func (p *Project) GetSpiders() ([]Spider, error)

func (*Project) Save

func (p *Project) Save() error

type Schedule

type Schedule struct {
	Id             bson.ObjectId   `json:"_id" bson:"_id"`
	Name           string          `json:"name" bson:"name"`
	Description    string          `json:"description" bson:"description"`
	SpiderId       bson.ObjectId   `json:"spider_id" bson:"spider_id"`
	Cron           string          `json:"cron" bson:"cron"`
	EntryId        cron.EntryID    `json:"entry_id" bson:"entry_id"`
	Param          string          `json:"param" bson:"param"`
	RunType        string          `json:"run_type" bson:"run_type"`
	NodeIds        []bson.ObjectId `json:"node_ids" bson:"node_ids"`
	Status         string          `json:"status" bson:"status"`
	Enabled        bool            `json:"enabled" bson:"enabled"`
	UserId         bson.ObjectId   `json:"user_id" bson:"user_id"`
	ScrapySpider   string          `json:"scrapy_spider" bson:"scrapy_spider"`
	ScrapyLogLevel string          `json:"scrapy_log_level" bson:"scrapy_log_level"`

	// 前端展示
	SpiderName string `json:"spider_name" bson:"spider_name"`
	Username   string `json:"user_name" bson:"user_name"`
	Nodes      []Node `json:"nodes" bson:"nodes"`
	Message    string `json:"message" bson:"message"`

	CreateTs time.Time `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
}

func GetSchedule

func GetSchedule(id bson.ObjectId) (Schedule, error)

func GetScheduleList

func GetScheduleList(filter interface{}) ([]Schedule, error)

func (*Schedule) Delete

func (sch *Schedule) Delete() error

func (*Schedule) Save

func (sch *Schedule) Save() error

type SecuritySetting

type SecuritySetting struct {
	EnableRegister   bool
	EnableInvitation bool
	DocumentMeta     `bson:"inline" json:"inline"`
}

demo

func GetSecuritySetting

func GetSecuritySetting() (SecuritySetting, error)

type Setting

type Setting struct {
	Keyword  string
	Document bson.Raw
}

type Spider

type Spider struct {
	Id          bson.ObjectId `json:"_id" bson:"_id"`                   // 爬虫ID
	Name        string        `json:"name" bson:"name"`                 // 爬虫名称(唯一)
	DisplayName string        `json:"display_name" bson:"display_name"` // 爬虫显示名称
	Type        string        `json:"type" bson:"type"`                 // 爬虫类别
	FileId      bson.ObjectId `json:"file_id" bson:"file_id"`           // GridFS文件ID
	Col         string        `json:"col" bson:"col"`                   // 结果储存位置
	Site        string        `json:"site" bson:"site"`                 // 爬虫网站
	Envs        []Env         `json:"envs" bson:"envs"`                 // 环境变量
	Remark      string        `json:"remark" bson:"remark"`             // 备注
	Src         string        `json:"src" bson:"src"`                   // 源码位置
	ProjectId   bson.ObjectId `json:"project_id" bson:"project_id"`     // 项目ID
	IsPublic    bool          `json:"is_public" bson:"is_public"`       // 是否公开

	// 自定义爬虫
	Cmd string `json:"cmd" bson:"cmd"` // 执行命令

	// Scrapy 爬虫(属于自定义爬虫)
	IsScrapy    bool     `json:"is_scrapy" bson:"is_scrapy"`       // 是否为 Scrapy 爬虫
	SpiderNames []string `json:"spider_names" bson:"spider_names"` // 爬虫名称列表

	// 可配置爬虫
	Template string `json:"template" bson:"template"` // Spiderfile模版

	// Git 设置
	IsGit            bool   `json:"is_git" bson:"is_git"`                         // 是否为 Git
	GitUrl           string `json:"git_url" bson:"git_url"`                       // Git URL
	GitBranch        string `json:"git_branch" bson:"git_branch"`                 // Git 分支
	GitHasCredential bool   `json:"git_has_credential" bson:"git_has_credential"` // Git 是否加密
	GitUsername      string `json:"git_username" bson:"git_username"`             // Git 用户名
	GitPassword      string `json:"git_password" bson:"git_password"`             // Git 密码
	GitAutoSync      bool   `json:"git_auto_sync" bson:"git_auto_sync"`           // Git 是否自动同步
	GitSyncFrequency string `json:"git_sync_frequency" bson:"git_sync_frequency"` // Git 同步频率
	GitSyncError     string `json:"git_sync_error" bson:"git_sync_error"`         // Git 同步错误

	// 长任务
	IsLongTask bool `json:"is_long_task" bson:"is_long_task"` // 是否为长任务

	// 去重
	IsDedup     bool   `json:"is_dedup" bson:"is_dedup"`         // 是否去重
	DedupField  string `json:"dedup_field" bson:"dedup_field"`   // 去重字段
	DedupMethod string `json:"dedup_method" bson:"dedup_method"` // 去重方式

	// Web Hook
	IsWebHook  bool   `json:"is_web_hook" bson:"is_web_hook"`   // 是否开启 Web Hook
	WebHookUrl string `json:"web_hook_url" bson:"web_hook_url"` // Web Hook URL

	// 前端展示
	LastRunTs   time.Time               `json:"last_run_ts"`  // 最后一次执行时间
	LastStatus  string                  `json:"last_status"`  // 最后执行状态
	Config      entity.ConfigSpiderData `json:"config"`       // 可配置爬虫配置
	LatestTasks []Task                  `json:"latest_tasks"` // 最近任务列表
	Username    string                  `json:"username"`     // 用户名称
	ProjectName string                  `json:"project_name"` // 项目名称

	// 时间
	UserId   bson.ObjectId `json:"user_id" bson:"user_id"`
	CreateTs time.Time     `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time     `json:"update_ts" bson:"update_ts"`
}

func GetSpider

func GetSpider(id bson.ObjectId) (Spider, error)

获取爬虫(根据ID)

func GetSpiderAllList

func GetSpiderAllList(filter interface{}) (spiders []Spider, err error)

获取所有爬虫列表

func GetSpiderByFileId

func GetSpiderByFileId(fileId bson.ObjectId) *Spider

获取爬虫(根据FileId)

func GetSpiderByName

func GetSpiderByName(name string) Spider

获取爬虫(根据名称)

func GetSpiderList

func GetSpiderList(filter interface{}, skip int, limit int, sortStr string) ([]Spider, int, error)

获取爬虫列表

func (*Spider) Add

func (spider *Spider) Add() error

新增爬虫

func (*Spider) Delete

func (spider *Spider) Delete() error

删除爬虫

func (*Spider) GetLastTask

func (spider *Spider) GetLastTask() (Task, error)

爬虫最新的任务

func (*Spider) GetLatestTasks

func (spider *Spider) GetLatestTasks(latestN int) (tasks []Task, err error)

爬虫正在运行的任务

func (*Spider) GetTasks

func (spider *Spider) GetTasks() ([]Task, error)

获取爬虫的任务

func (*Spider) Save

func (spider *Spider) Save() error

更新爬虫

type Task

type Task struct {
	Id              string        `json:"_id" bson:"_id"`
	SpiderId        bson.ObjectId `json:"spider_id" bson:"spider_id"`
	StartTs         time.Time     `json:"start_ts" bson:"start_ts"`
	FinishTs        time.Time     `json:"finish_ts" bson:"finish_ts"`
	Status          string        `json:"status" bson:"status"`
	NodeId          bson.ObjectId `json:"node_id" bson:"node_id"`
	LogPath         string        `json:"log_path" bson:"log_path"`
	Cmd             string        `json:"cmd" bson:"cmd"`
	Param           string        `json:"param" bson:"param"`
	Error           string        `json:"error" bson:"error"`
	ResultCount     int           `json:"result_count" bson:"result_count"`
	ErrorLogCount   int           `json:"error_log_count" bson:"error_log_count"`
	WaitDuration    float64       `json:"wait_duration" bson:"wait_duration"`
	RuntimeDuration float64       `json:"runtime_duration" bson:"runtime_duration"`
	TotalDuration   float64       `json:"total_duration" bson:"total_duration"`
	Pid             int           `json:"pid" bson:"pid"`
	RunType         string        `json:"run_type" bson:"run_type"`
	ScheduleId      bson.ObjectId `json:"schedule_id" bson:"schedule_id"`
	Type            string        `json:"type" bson:"type"`

	// 前端数据
	SpiderName string   `json:"spider_name"`
	NodeName   string   `json:"node_name"`
	Username   string   `json:"username"`
	NodeIds    []string `json:"node_ids"`

	UserId   bson.ObjectId `json:"user_id" bson:"user_id"`
	CreateTs time.Time     `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time     `json:"update_ts" bson:"update_ts"`
}

func GetNodeTaskList

func GetNodeTaskList(id bson.ObjectId) ([]Task, error)

任务列表

func GetTask

func GetTask(id string) (Task, error)

func GetTaskByFilter

func GetTaskByFilter(filter bson.M) (t Task, err error)

func GetTaskList

func GetTaskList(filter interface{}, skip int, limit int, sortKey string) ([]Task, error)

func (*Task) Delete

func (t *Task) Delete() error

func (*Task) GetErrorLogItems

func (t *Task) GetErrorLogItems(n int) (errLogItems []ErrorLogItem, err error)

func (*Task) GetLogItems

func (t *Task) GetLogItems(keyword string, page int, pageSize int) (logItems []LogItem, logTotal int, err error)

func (*Task) GetNode

func (t *Task) GetNode() (Node, error)

func (*Task) GetResults

func (t *Task) GetResults(pageNum int, pageSize int) (results []interface{}, total int, err error)

func (*Task) GetSpider

func (t *Task) GetSpider() (Spider, error)

func (*Task) Save

func (t *Task) Save() error

type TaskDailyItem

type TaskDailyItem struct {
	Date               string  `json:"date" bson:"_id"`
	TaskCount          int     `json:"task_count" bson:"task_count"`
	AvgRuntimeDuration float64 `json:"avg_runtime_duration" bson:"avg_runtime_duration"`
}

func GetDailyTaskStats

func GetDailyTaskStats(query bson.M) ([]TaskDailyItem, error)

type Token

type Token struct {
	Id       bson.ObjectId `json:"_id" bson:"_id"`
	Token    string        `json:"token" bson:"token"`
	UserId   bson.ObjectId `json:"user_id" bson:"user_id"`
	CreateTs time.Time     `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time     `json:"update_ts" bson:"update_ts"`
}

func GetTokenById

func GetTokenById(id bson.ObjectId) (t Token, err error)

func GetTokensByUserId

func GetTokensByUserId(uid bson.ObjectId) (tokens []Token, err error)

func (*Token) Add

func (t *Token) Add() error

func (*Token) Delete

func (t *Token) Delete() error

type User

type User struct {
	Id       bson.ObjectId `json:"_id" bson:"_id"`
	Username string        `json:"username" bson:"username"`
	Password string        `json:"password" bson:"password"`
	Role     string        `json:"role" bson:"role"`
	Email    string        `json:"email" bson:"email"`
	Setting  UserSetting   `json:"setting" bson:"setting"`

	UserId   bson.ObjectId `json:"user_id" bson:"user_id"`
	CreateTs time.Time     `json:"create_ts" bson:"create_ts"`
	UpdateTs time.Time     `json:"update_ts" bson:"update_ts"`
}

func GetUser

func GetUser(id bson.ObjectId) (User, error)

func GetUserByUsername

func GetUserByUsername(username string) (User, error)

func GetUserList

func GetUserList(filter interface{}, skip int, limit int, sortKey string) ([]User, error)

func (*User) Add

func (user *User) Add() error

func (*User) Save

func (user *User) Save() error

type UserSetting

type UserSetting struct {
	NotificationTrigger  string   `json:"notification_trigger" bson:"notification_trigger"`
	DingTalkRobotWebhook string   `json:"ding_talk_robot_webhook" bson:"ding_talk_robot_webhook"`
	WechatRobotWebhook   string   `json:"wechat_robot_webhook" bson:"wechat_robot_webhook"`
	EnabledNotifications []string `json:"enabled_notifications" bson:"enabled_notifications"`
	ErrorRegexPattern    string   `json:"error_regex_pattern" bson:"error_regex_pattern"`
	MaxErrorLog          int      `json:"max_error_log" bson:"max_error_log"`
	LogExpireDuration    int64    `json:"log_expire_duration" bson:"log_expire_duration"`
}

type Variable

type Variable struct {
	Id     bson.ObjectId `json:"_id" bson:"_id"`
	Key    string        `json:"key" bson:"key"`
	Value  string        `json:"value" bson:"value"`
	Remark string        `json:"remark" bson:"remark"`
}

func GetByKey

func GetByKey(key string) (Variable, error)

func GetVariable

func GetVariable(id bson.ObjectId) (Variable, error)

func GetVariableList

func GetVariableList() []Variable

func (*Variable) Add

func (model *Variable) Add() error

func (*Variable) Delete

func (model *Variable) Delete() error

func (*Variable) Save

func (model *Variable) Save() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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