Documentation
¶
Index ¶
- func AddMaterial(material Material) error
- func CreateUser(user User) error
- func MakeMigrations()
- type InsulationLayer
- type InsulationResult
- type Material
- func (t *Material) CreateMaterial() (Material, error)
- func (t *Material) DeleteMaterial() error
- func (t *Material) GetAllMaterials() ([]Material, error)
- func (t *Material) GetMaterialById() (Material, error)
- func (t *Material) SearchMaterial(search Search) ([]Material, error)
- func (t *Material) UpdateMaterial() (Material, error)
- type Search
- type TOMLData
- type Todo
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMaterial ¶
func CreateUser ¶
func MakeMigrations ¶
func MakeMigrations()
Types ¶
type InsulationLayer ¶
type InsulationLayer struct {
Material Material `json:"material"`
Thickness float64 `json:"thickness"`
UValue float64 `json:"u_value"`
}
New structs for insulation calculation
type InsulationResult ¶
type InsulationResult struct {
Layers []InsulationLayer `json:"layers"`
TotalUValue float64 `json:"total_u_value"`
TotalCost float64 `json:"total_cost"`
}
type Material ¶
type Material struct {
ID uint64 `json:"id" toml:"id"`
CreatedBy uint64 `json:"created_by" toml:"created_by"`
Name string `json:"name" toml:"name"`
Description string `json:"description,omitempty" toml:"description"`
Lambda float64 `json:"lambda" toml:"lambda"`
Price float64 `json:"price,omitempty" toml:"price"`
Thickness float64 `json:"thickness" toml:"thickness"`
Type string `json:"type" toml:"type"`
}
func GetAllMaterials ¶
func GetMaterialsByIDs ¶
func LoadMaterialsFromTOML ¶
LoadMaterialsFromTOML loads materials from a TOML file
func (*Material) CreateMaterial ¶
func (*Material) DeleteMaterial ¶
func (*Material) GetAllMaterials ¶
func (*Material) GetMaterialById ¶
func (*Material) SearchMaterial ¶
func (*Material) UpdateMaterial ¶
type TOMLData ¶
type TOMLData struct {
Insulation []Material `toml:"insulation"`
Other []Material `toml:"other"`
Wall []Material `toml:"wall"`
}
TOMLData represents the structure of your TOML file
type Todo ¶
type Todo struct {
ID uint64 `json:"id"`
CreatedBy uint64 `json:"created_by"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status bool `json:"status,omitempty"`
}
func (*Todo) CreateTodo ¶
func (*Todo) DeleteTodo ¶
func (*Todo) GetAllTodos ¶
func (*Todo) GetNoteById ¶
func (*Todo) UpdateTodo ¶
Click to show internal directories.
Click to hide internal directories.