tisp

package module
v0.0.0-...-365c9eb Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 6 Imported by: 0

README

tisp

T.i.s.p. = Tisp Is A Secret Project

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSelector = Selector{
	BySelectors: nil,
	ByIDs:       nil,
	First:       20,
	Skip:        0,
}

Functions

func CurrentVersion

func CurrentVersion() string

func IsCorrectVersion

func IsCorrectVersion(version string) error

func StrPoint

func StrPoint(str string) *string

Types

type Cost

type Cost struct {
	Units string
	Value float64
}

func (*Cost) By

func (c *Cost) By() (string, error)

func (*Cost) IsRatio

func (c *Cost) IsRatio() bool

func (*Cost) IsValid

func (c *Cost) IsValid() bool

func (*Cost) Lower

func (c *Cost) Lower() (string, error)

func (*Cost) Upper

func (c *Cost) Upper() (string, error)

type ExperienceType

type ExperienceType string
const (
	Junior      ExperienceType = "junior"
	Middle      ExperienceType = "middle"
	Senior      ExperienceType = "senior"
	SuperSenior ExperienceType = "super-senior"
	God         ExperienceType = "god"
)

func (*ExperienceType) Nerf

func (exp *ExperienceType) Nerf()

func (*ExperienceType) Promote

func (exp *ExperienceType) Promote()

type ID

type ID string

type Machine

type Machine struct {
	State StateManager
}

type NewPartnerInformation

type NewPartnerInformation struct {
	CompanyName string  `json:"name" yaml:"name"`
	Selector    *string `json:"selector" yaml:"selector"`

	Email *string `json:"email" yaml:"email"`
	Phone *string `json:"phone" yaml:"phone"`
}

type NewProjectInformation

type NewProjectInformation struct {
	Name      string  `json:"name" yaml:"name"`
	Selector  *string `json:"selector" yaml:"selector"`
	PartnerID string  `json:"partner" yaml:"partner"`
}

type NewResourceInformation

type NewResourceInformation struct {
	Name       string            `json:"name" yaml:"name"`
	Cost       Cost              `json:"cost" yaml:"cost"`
	MainType   p.ResourceType    `json:"mainType" yaml:"mainType"`
	Experience float64           `json:"experience" yaml:"experience"`
	Selector   *string           `json:"selector" yaml:"selector"`
	Alias      *string           `json:"alias" yaml:"alias"`
	Types      *[]p.ResourceType `json:"types" yaml:"types"`
}

type NewStage

type NewStage struct {
	Name     string                `json:"name" yaml:"name"`
	Selector *string               `json:"selector" yaml:"selector"`
	Tasks    *[]NewTaskInformation `json:"tasks" yaml:"tasks"`
}

type NewTaskInformation

type NewTaskInformation struct {
	Title       string                `json:"title" yaml:"title"`
	Description string                `json:"description" yaml:"description"`
	Selector    *string               `json:"selector" yaml:"selector"`
	Resources   *[]string             `json:"resources" yaml:"resources"`
	Leader      *string               `json:"leader" yaml:"leader"`
	Children    *[]NewTaskInformation `json:"tasks" yaml:"tasks"`
}

type Selector

type Selector struct {
	BySelectors *[]string
	ByIDs       *[]string

	First int32
	Skip  int32
}

type StateManager

type StateManager interface {
	RegisterNewProject(info NewProjectInformation) (*p.Project, error)
	RegisterNewResource(newRes NewResourceInformation) (*p.Resource, error)
	RegisterNewPartner(newClient NewPartnerInformation) (*p.Partner, error)

	AddTaskToProject(projectID string, task NewTaskInformation) (*p.Project, error)
	AddSubTaskToTask(taskID string, task NewTaskInformation) (*p.Task, error)
	AddResourceToTask(taskID string, res NewResourceInformation) (*p.Task, error)
	// ++
	AddStageToProject(projectID string, newStage NewStage) (*p.Project, error)
	AddTaskToStage(projectID, stageID string, task NewTaskInformation) (*p.Project, error)
	AddStageToStage(projectID, stageID string, newStage NewStage) (*p.Project, error)

	GetProjects(p ...Selector) ([]p.Project, error)
	GetProject(projectID string) (*p.Project, error)
	GetProjectBySelector(selector string) (*p.Project, error)

	GetResources(p ...Selector) ([]p.Resource, error)
	GetResource(resID string) (*p.Resource, error)
	GetResourceBySelector(selector string) (*p.Resource, error)

	GetTasks(p ...Selector) ([]p.Task, error)
	GetTask(taskID string) (*p.Task, error)
	GetTaskBySelector(selector string) (*p.Task, error)

	GetPartners(p ...Selector) ([]p.Partner, error)
	GetPartner(partnerID string) (*p.Partner, error)
	GetPartnerBySelector(selector string) (*p.Partner, error)
}

type TaskState

type TaskState string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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