internal

package
v0.0.0-...-d85e56b Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
	ErrConflict = errors.New("already exists")
	ErrInvalid  = errors.New("invalid entity")
)

Functions

This section is empty.

Types

type Color

type Color string
const (
	Black          Color = "#000000"
	Blue           Color = "#0000FF"
	BlueViolet     Color = "#8A2BE2"
	Brown          Color = "#A52A2A"
	CadetBlue      Color = "#5F9EA0"
	Chocolate      Color = "#D2691E"
	CornflowerBlue Color = "#6495ED"
	Crimson        Color = "#DC143C"
	DarkBlue       Color = "#00008B"
	DarkCyan       Color = "#008B8B"
	DarkGoldenRod  Color = "#B8860B"
	DarkGreen      Color = "#006400"
	DarkMagenta    Color = "#8B008B"
	DarkOliveGreen Color = "#556B2F"
	DarkOrchid     Color = "#9932CC"
	DarkRed        Color = "#8B0000"
	DarkSlateBlue  Color = "#483D8B"
	DarkSlateGray  Color = "#2F4F4F"
	DarkTurquoise  Color = "#00CED1"
	DarkViolet     Color = "#9400D3"
	DeepPink       Color = "#FF1493"
	DeepSkyBlue    Color = "#00BFFF"
	DimGray        Color = "#696969"
	DodgerBlue     Color = "#1E90FF"
	FireBrick      Color = "#B22222"
	ForestGreen    Color = "#228B22"
	IndianRed      Color = "#CD5C5C"
	Indigo         Color = "#4B0082"
	MidnightBlue   Color = "#191970"
	OliveDrab      Color = "#6B8E23"
	OrangeRed      Color = "#FF4500"
)

func GetRandomColor

func GetRandomColor() Color

type Configuration

type Configuration struct {
	DatabaseFile string
	BucketName   string
}

func LoadEnvConfiguration

func LoadEnvConfiguration() Configuration

type Resource

type Resource struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
	Tags []Tag  `json:"tags"`
}

type ResourceFactory

type ResourceFactory interface {
	CreateResource(resource Resource) (Resource, error)
}

type ResourceParams

type ResourceParams struct {
	Type string `schema:"type"`
	Name string `schema:"name"`
	Tag  string `schema:"tag"`
}

type ResourceRepository

type ResourceRepository interface {
	FindResourceByID(id string) (Resource, error)
	FindAllResources(params *ResourceParams) ([]Resource, error)
}

type ResourceTagger

type ResourceTagger interface {
	AddTagToResource(resource Resource, tag string) (Resource, error)
	DeleteTagFromResource(resource Resource, tag string) error
}

type Tag

type Tag struct {
	Name  string `json:"name"`
	Color Color  `json:"color"`
}

type TagFactory

type TagFactory interface {
	CreateTag(tag Tag) (Tag, error)
}

type TagParams

type TagParams struct {
	Type string `schema:"type"`
}

type TagRepository

type TagRepository interface {
	FindTagByName(name string) (Tag, error)
	FindAllTags(params *TagParams) ([]Tag, error)
}

Directories

Path Synopsis
handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳