storage

package
v0.0.0-...-ae75a06 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskDomainCropArea

type TaskDomainCropArea struct {
	AreaID   *uuid.UUID `json:"area_id"`
	AreaName string     `json:"area_name"`
}

type TaskDomainCropBatch

type TaskDomainCropBatch struct {
	CropID      *uuid.UUID `json:"crop_id"`
	CropBatchID string     `json:"crop_batch_id"`
}

type TaskDomainCropMaterial

type TaskDomainCropMaterial struct {
	MaterialID           *uuid.UUID `json:"material_id"`
	MaterialName         string     `json:"material_name"`
	MaterialType         string     `json:"material_type"`
	MaterialDetailedType string     `json:"material_detailed_type"`
}

type TaskDomainDetailedArea

type TaskDomainDetailedArea struct {
	MaterialID           *uuid.UUID `json:"material_id"`
	MaterialName         string     `json:"material_name"`
	MaterialType         string     `json:"material_type"`
	MaterialDetailedType string     `json:"material_detailed_type"`
}

func (TaskDomainDetailedArea) Code

func (d TaskDomainDetailedArea) Code() string

type TaskDomainDetailedCrop

type TaskDomainDetailedCrop struct {
	Material *TaskDomainCropMaterial `json:"material"`
	Area     *TaskDomainCropArea     `json:"area"`
	Crop     *TaskDomainCropBatch    `json:"crop"`
}

Implements TaskDomain interface in domain But contains more detailed information of material, area and crop.

func (TaskDomainDetailedCrop) Code

func (d TaskDomainDetailedCrop) Code() string

type TaskDomainDetailedReservoir

type TaskDomainDetailedReservoir struct {
	MaterialID           *uuid.UUID `json:"material_id"`
	MaterialName         string     `json:"material_name"`
	MaterialType         string     `json:"material_type"`
	MaterialDetailedType string     `json:"material_detailed_type"`
}

func (TaskDomainDetailedReservoir) Code

type TaskEvent

type TaskEvent struct {
	TaskUID     uuid.UUID
	Version     int
	CreatedDate time.Time
	Event       interface{}
}

type TaskEventStorage

type TaskEventStorage struct {
	Lock       *deadlock.RWMutex
	TaskEvents []TaskEvent
}

func CreateTaskEventStorage

func CreateTaskEventStorage() *TaskEventStorage

type TaskRead

type TaskRead struct {
	Title         string            `json:"title"`
	UID           uuid.UUID         `json:"uid"`
	Description   string            `json:"description"`
	CreatedDate   time.Time         `json:"created_date"`
	DueDate       *time.Time        `json:"due_date,omitempty"`
	CompletedDate *time.Time        `json:"completed_date"`
	CancelledDate *time.Time        `json:"cancelled_date"`
	Priority      string            `json:"priority"`
	Status        string            `json:"status"`
	Domain        string            `json:"domain"`
	DomainDetails domain.TaskDomain `json:"domain_details"`
	Category      string            `json:"category"`
	IsDue         bool              `json:"is_due"`
	AssetID       *uuid.UUID        `json:"asset_id"`
}

type TaskReadStorage

type TaskReadStorage struct {
	Lock        *deadlock.RWMutex
	TaskReadMap map[uuid.UUID]TaskRead
}

func CreateTaskReadStorage

func CreateTaskReadStorage() *TaskReadStorage

Jump to

Keyboard shortcuts

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