Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BasePath is the path to the project BasePath = os.Getenv("GOPATH") + "/src/github.com/kiketordera/pilar-web" )
Functions ¶
This section is empty.
Types ¶
type Case ¶
type Case struct { ID bson.ObjectId `json:"id"` UserID bson.ObjectId `json:"userid"` Name string `json:"name" form:"name" binding:"required"` Docs []string `json:"docs"` // This is the case used by the lawyer in his excels InternalID string `json:"ref" form:"ref" binding:"required"` // If stateCompleted true, the case is closed StateCompleted bool `json:"statecompleted"` Hitos []Hito `json:"hitos"` // Used for the HTML NameUser string `json:"nameuser"` }
User is the user of the system
type DB ¶
DB is the DataBase which contains the information.
func InitDatabase ¶
func InitDatabase() DB
InitDatabase returns the DataBase of the project or creates a new DataBase if does not exists
type Date ¶
type Date struct { ID bson.ObjectId `json:"id"` CaseID bson.ObjectId `json:"caseid"` Date time.Time `json:"dates"` PlaceFirstLine string `json:"place1" form:"juzgadoplace"` PlaceSecondLine string `json:"place1" form:"juzgadonumber"` Pueblo string `json:"pueblo" form:"pueblo"` Provincia string `json:"provincia" form:"provincia"` }
type TokenClaims ¶
type TokenClaims struct { Username string `json:"usr,omitempty"` Role string `json:"rol,omitempty"` jwt.StandardClaims }
TokenClaims is the token that we store in the cookies
type User ¶
type User struct { ID bson.ObjectId `json:"id"` Name string `json:"name" form:"name" binding:"required"` Surname string `json:"surname" form:"surname" binding:"required"` Email string `json:"email" form:"email" binding:"required"` Phone int `json:"email" form:"phone" binding:"required"` Password string `json:"password" form:"password"` Role Role `json:"role" form:"role"` }
User is the user of the system
Click to show internal directories.
Click to hide internal directories.