package main import ( "bytes" "github.com/gin-gonic/gin" cfg "github.com/jesusperez/cfgsrv" ) type RunFlags struct { command string cfgPath string usersPath string modelName string keyPath string genPath string text string textPath string url string version bool } type ModelUser struct { Model string `yaml:"model"` User string `yaml:"user"` Active bool `yaml:"active"` Data string `yaml:"data"` } type Invitation struct { Email string `yaml:"email"` Createdby string `yaml:"createdby"` Expire string `yaml:"expire"` Howmany int `yaml:"howmany"` Role string `yaml:"role"` Description string `yaml:"description"` Data string `yaml:"data"` Active bool `yaml:"active"` } type PostInvitation struct { Id string Data Invitation } type Account struct { Username string `yaml:"username"` Passwd string `yaml:"passwd"` Email string `yaml:"email"` Description string `yaml:"description"` Data string `yaml:"data"` Web bool `yaml:"web"` Id string `yaml:"id"` } type UsersAccounts struct { Accounts map[string]Account `yaml:"accounts"` } type NewUserData struct { Username string `yaml:"username" json:"username"` Passwd string `yaml:"password" json:"password"` Email string `yaml:"email" json:"email"` Role string `yaml:"role" json:"role"` Data string `yaml:"data" json:"data"` } type WebAccounts struct { Accounts gin.Accounts `yaml:"accounts"` } type Login struct { Username string `form:"username" json:"username" binding:"required"` Password string `form:"password" json:"password" binding:"required"` } type User struct { UserName string UUID string Data string FirstName string LastName string } // type Data interface { // type Config, int8, int16, int32, int64 // } type ConfigPostData struct { Id string `yaml:"id" json:"id"` Val string `yaml:"val" json:"val"` Config cfg.Config `yaml:"config" json:"config"` } type LogInfo struct { Run string `yaml:"run" json:"run"` Route string `yaml:"route" json:"route"` Lang string `yaml:"lang" json:"lang"` Agent string `yaml:"agent" json:"agent"` Ip string `yaml:"ip" json:"ip"` Tkn string `yaml:"tkn" json:"tkn"` } type TrackAction struct { When string `yaml:"when" json:"when"` Where string `yaml:"where" json:"where"` What string `yaml:"what" json:"what"` Context string `yaml:"context" json:"context"` Data string `yaml:"data" json:"data"` Auth string `yaml:"auth" json:"auth"` Ip string `yaml:"ip" json:"ip"` } type PostTrackAction struct { When string `yaml:"when" json:"when"` Where string `yaml:"where" json:"where"` What string `yaml:"what" json:"what"` Context string `yaml:"context" json:"context"` Data string `yaml:"data" json:"data"` } type UsersData struct { UsersData string `yaml:"usersData" json:"usersData"` ModelsData string `yaml:"modelsData" json:"modelsData"` Invitations string `yaml:"invitations" json:"invitations"` AuthzModel string `yaml:"authzModel" json:"authzModel"` AuthzPolicy string `yaml:"authzPolicy" json:"authzPolicy"` } type UsersDataPost struct { Id string `yaml:"id" json:"id"` Val string `yaml:"val" json:"val"` Data UsersData `yaml:"data" json:"data"` } type UsersRecoveryPost struct { Id string `yaml:"id" json:"id"` Val string `yaml:"val" json:"val"` } type UsersRecover struct { Id string `yaml:"id" json:"id"` Data Account `yaml:"data" json:"data"` } type SaveDataInfo struct { Title string Data string Id string Path string Prfx string } type Mail struct { Sender string To []string Cc []string Bcc []string Subject string Body bytes.Buffer // Headers textproto.MIMEHeader } type AppData struct { Data interface{} Expire string }