misato

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoFiles            = errors.New("No MisatoFiles available in this location")
	ErrMissingInformation = errors.New("Invalid entries - fields are missing")
)
View Source
var (
	ErrMissingFields = errors.New("Missing Fields")
)

Functions

This section is empty.

Types

type Activity

type Activity struct {
	User      string `json:"user"`
	Timestamp int    `json:"time,string"`

	Type    string `json:"type"`
	Subject string `json:"subject"`
	Data    string `json:"data"`
}

Activities

func ActivityFromJson

func ActivityFromJson(raw string) (*Activity, error)

CLILogFromJson returns a CLILog from

func (*Activity) Valid

func (ac *Activity) Valid() (ok bool)

Valid checks if all necessary arguments are available

type CLILog

type CLILog struct {
	User      string `json:"user"`
	Command   string `json:"command"`
	TermUUID  string `json:"termuuid"`
	Timestamp int    `json:"time,string"`
}

CLILOg is a struct containing all relevant information about alll the things

func CLILogFromJson

func CLILogFromJson(raw string) (*CLILog, error)

CLILogFromJson returns a CLILog from

func (*CLILog) Valid

func (cli *CLILog) Valid() (ok bool)

Valid checks if all necessary arguments are available

type Milestone

type Milestone struct {
	Timestamp int    `json:"time,string"`
	User      string `json:"user"`
	Milestone string `json:"milestone"`
}

Milestone is an information struct for storing milestones :D

func (*Milestone) Valid

func (m *Milestone) Valid() (ok bool)

type MilestoneByTime

type MilestoneByTime struct{ Milestones }

func (MilestoneByTime) Less

func (s MilestoneByTime) Less(i, j int) bool

type Milestones

type Milestones []*Milestone

func (Milestones) Len

func (ms Milestones) Len() int

func (Milestones) Swap

func (ms Milestones) Swap(i, j int)

type Misato

type Misato struct {
	Dir string
}

Misato handles the search for commands

func New

func New(misatoDir string) (*Misato, error)

New Creates a new misato instance

func (*Misato) GetActivities

func (m *Misato) GetActivities() []*Activity

getActivities

func (*Misato) GetByTime

func (m *Misato) GetByTime(start, stop int) (result []CLILog, err error)

func (*Misato) GetMileStones

func (m *Misato) GetMileStones() []*Milestone

aaa GetMileStonesViewer

func (*Misato) PutActivity

func (m *Misato) PutActivity(activity Activity, id string) error

func (*Misato) PutCommand

func (m *Misato) PutCommand(clilog CLILog, id string) error

PutCommands saves the Command

func (*Misato) PutMileStone

func (m *Misato) PutMileStone(milestone Milestone, id string) error

PutMileStone saves

func (*Misato) SearchCommands

func (m *Misato) SearchCommands(search string) (result map[string][]string, err error)

SearchCommands searches for all json files based on the searchstring

Jump to

Keyboard shortcuts

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