source

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalStrings added in v1.0.5

func CanonicalStrings() []string

CanonicalStrings returns a slice of all String values of the enum

Types

type Canonical

type Canonical int

Canonical it's the type that defines the different Sources supported

const (
	Github Canonical = iota
	Gitlab
	Trello
	Zeplin
)

List of all the supported Sources

func CanonicalString

func CanonicalString(s string) (Canonical, error)

CanonicalString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func CanonicalValues

func CanonicalValues() []Canonical

CanonicalValues returns all values of the enum

func (Canonical) IsACanonical

func (i Canonical) IsACanonical() bool

IsACanonical returns "true" if the value is listed in the enum definition. "false" otherwise

func (Canonical) String

func (i Canonical) String() string

type Repository

type Repository interface {
	// Filter returns a list of Source without
	// any filter
	Filter(ctx context.Context) ([]Source, error)
}

Repository it's the interface for dealing with the Source entity

type Source

type Source struct {
	ID        string
	Name      string
	Canonical Canonical
}

Source it's the basic entity representing the Source configured

func (*Source) BuildID

func (s *Source) BuildID()

BuildID builds the ID of the Source by concatenating the 'Canonical' with the 'Name' with a '-'

Jump to

Keyboard shortcuts

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