Documentation
¶
Index ¶
- Variables
- type Apiary
- func (r *Apiary) Create(input ApiaryInput) (*Apiary, error)
- func (r *Apiary) Deactivate(id string) (*bool, error)
- func (r *Apiary) Get(id string) (*Apiary, error)
- func (Apiary) IsEntity()
- func (r *Apiary) List() ([]*Apiary, error)
- func (r *Apiary) Update(id string, input ApiaryInput) (*Apiary, error)
- type ApiaryInput
- type Box
- func (r *Box) Count(hiveId string) (int, error)
- func (r *Box) Create(hiveId string, position int, color *string, boxType BoxType) (*string, error)
- func (r *Box) CreateByHiveId(hiveId string, boxCount int, colors []*string) error
- func (r *Box) Deactivate(id string) (*bool, error)
- func (r *Box) Get(id string) (*Box, error)
- func (r *Box) ListByHive(hiveId string) ([]*Box, error)
- func (r *Box) SwapBoxPositions(box1ID string, box2ID string) (*bool, error)
- func (r *Box) Update(id *string, position int, color *string) (bool, error)
- type BoxInput
- type BoxType
- type Family
- type FamilyInput
- type Frame
- func (r *Frame) Create(boxID *string, position int, frameType FrameType, leftID *int64, ...) (*int64, error)
- func (r *Frame) CreateFramesForBox(boxID *string, frameCount int) error
- func (r *Frame) Deactivate(id string) (*bool, error)
- func (r *Frame) DeactivateFrames(boxId *string) error
- func (r *Frame) Get(id int64) (*Frame, error)
- func (r *Frame) IsFrameWithSides(frameType FrameType) bool
- func (r *Frame) ListByBox(boxId *string) ([]*Frame, error)
- func (r *Frame) Update(frameID string, boxID string, position int) (*int64, error)
- type FrameInput
- type FrameSide
- type FrameType
- type Hive
- func (r *Hive) Create(input HiveInput, familyID *int) (*Hive, error)
- func (r *Hive) Deactivate(id string) (*bool, error)
- func (r *Hive) Get(id string) (*Hive, error)
- func (Hive) IsEntity()
- func (r *Hive) List(userID string) ([]*Hive, error)
- func (r *Hive) ListByApiary(apiaryId int) ([]*Hive, error)
- func (r *Hive) Update(id string, name *string, notes *string, FamilyID *string) error
- type HiveInput
- type HiveUpdateInput
- type Inspection
- func (r *Inspection) CountByHiveId(hiveID string) (int, error)
- func (r *Inspection) Create(data string, hiveID int) (*string, error)
- func (r *Inspection) Get(ID string) (*Inspection, error)
- func (r *Inspection) GetLatestByHiveId(hiveID string) (*Inspection, error)
- func (r *Inspection) ListByHiveId(hiveID string) ([]*Inspection, error)
- type InspectionInput
- type Treatment
- func (r *Treatment) Get(id string) (*Treatment, error)
- func (r *Treatment) GetLastFamilyTreatment(familyId string) (*Treatment, error)
- func (Treatment) IsEntity()
- func (r *Treatment) ListFamilyTreatments(familyId string) ([]*Treatment, error)
- func (r *Treatment) TreatHive(input TreatmentOfHiveInput, familyId *int) (*Treatment, error)
- func (r *Treatment) TreatHiveBox(input TreatmentOfBoxInput, familyId *int) (*Treatment, error)
- type TreatmentOfBoxInput
- type TreatmentOfHiveInput
Constants ¶
This section is empty.
Variables ¶
View Source
var AllBoxType = []BoxType{ BoxTypeDeep, BoxTypeSuper, BoxTypeGate, BoxTypeVentilation, BoxTypeQueenExcluder, BoxTypeHorizontalFeeder, }
View Source
var AllFrameType = []FrameType{ FrameTypeVoid, FrameTypeFoundation, FrameTypeEmptyComb, FrameTypePartition, FrameTypeFeeder, }
Functions ¶
This section is empty.
Types ¶
type Apiary ¶
type ApiaryInput ¶
type Box ¶
type Box struct { Db *sqlx.DB ID *string `json:"id"` UserID string `db:"user_id"` HiveId int `json:"hive_id" db:"hive_id"` Position *int `json:"position"` Color *string `json:"color"` Type BoxType `json:"type" db:"type"` Active int `db:"active"` }
func (*Box) CreateByHiveId ¶
func (*Box) SwapBoxPositions ¶
type Family ¶
type Family struct { Db *sqlx.DB UserID string `db:"user_id"` ID string `json:"id" db:"id"` Race *string `json:"race" db:"race"` Age *int `json:"age"` Added *string `json:"added" db:"added"` Inspections []*Inspection `json:"inspections"` }
type FamilyInput ¶
type Frame ¶
type Frame struct { Db *sqlx.DB ID int `json:"id"` UserID string `db:"user_id"` BoxId int `db:"box_id"` Position int `json:"position"` Type FrameType `json:"type" db:"type"` LeftID *int `json:"left" db:"left_id"` RightID *int `json:"right" db:"right_id"` LeftSide *FrameSide `json:"left" ` RightSide *FrameSide `json:"right"` Active int `db:"active"` }
func (*Frame) CreateFramesForBox ¶
func (*Frame) DeactivateFrames ¶
func (*Frame) IsFrameWithSides ¶
type FrameInput ¶
type FrameType ¶
type FrameType string
func (FrameType) MarshalGQL ¶
func (*FrameType) UnmarshalGQL ¶
type Hive ¶
type Hive struct { Db *sqlx.DB ID string `json:"id"` UserID string `db:"user_id"` ApiaryID int `db:"apiary_id"` FamilyID *int `db:"family_id"` Active *bool `db:"active"` Name *string `json:"name"` Notes *string `json:"notes"` Note *string `json:"note"` Color *string `json:"color"` Status *string `json:"status"` Added *string `json:"added"` Boxes []*Box `json:"boxes"` }
type HiveUpdateInput ¶
type HiveUpdateInput struct { ID string `json:"id"` Name *string `json:"name"` Notes *string `json:"notes"` Family *FamilyInput `json:"family"` }
type Inspection ¶
type Inspection struct { Db *sqlx.DB ID string `json:"id" db:"id"` UserID string `db:"user_id"` HiveID string `json:"hiveId" db:"hive_id"` Data string `json:"data" db:"data"` Added string `json:"added" db:"added"` }
func (*Inspection) CountByHiveId ¶
func (r *Inspection) CountByHiveId(hiveID string) (int, error)
func (*Inspection) Get ¶
func (r *Inspection) Get(ID string) (*Inspection, error)
func (*Inspection) GetLatestByHiveId ¶
func (r *Inspection) GetLatestByHiveId(hiveID string) (*Inspection, error)
func (*Inspection) ListByHiveId ¶
func (r *Inspection) ListByHiveId(hiveID string) ([]*Inspection, error)
type InspectionInput ¶
type Treatment ¶
type Treatment struct { Db *sqlx.DB ID int `json:"id"` UserID string `json:"user_id" db:"user_id"` BoxId *string `json:"box_id" db:"box_id"` HiveId string `json:"hive_id" db:"hive_id"` FamilyId string `json:"family_id" db:"family_id"` Added string `json:"added" db:"added"` Type string `json:"type" db:"type"` }
func (*Treatment) GetLastFamilyTreatment ¶
func (*Treatment) ListFamilyTreatments ¶
func (*Treatment) TreatHive ¶
func (r *Treatment) TreatHive(input TreatmentOfHiveInput, familyId *int) (*Treatment, error)
func (*Treatment) TreatHiveBox ¶
func (r *Treatment) TreatHiveBox(input TreatmentOfBoxInput, familyId *int) (*Treatment, error)
type TreatmentOfBoxInput ¶
type TreatmentOfHiveInput ¶
Click to show internal directories.
Click to hide internal directories.