config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir     string
	GitDataDir  string
	ConfDir     string
	Port        int
	IndexerType string
	SizeLimit   int64
	Schedule    string
	Debug       bool
}

func NewConfig

func NewConfig(c *cli.Context, debug bool) Config

func (*Config) DeleteLatestIndexRefs

func (c *Config) DeleteLatestIndexRefs(organization string, project string, repository string, refs []string) error

func (*Config) GetAllIndexConf

func (c *Config) GetAllIndexConf() ([]IndexConfWrapper, error)

func (*Config) GetIndexedCommitID

func (c *Config) GetIndexedCommitID(latestIndex LatestIndex) (string, bool)

func (*Config) GetRefs

func (c *Config) GetRefs(organization string, project string, repository string) ([]Ref, error)

func (*Config) UpdateLatestIndex

func (c *Config) UpdateLatestIndex(url string, latestIndex LatestIndex, commitId string) error

type IndexConf

type IndexConf struct {
	Url  string `json:"url"`
	Refs []Ref  `json:"refs"`
}

type IndexConfWrapper

type IndexConfWrapper struct {
	IndexConf
	Organization string
	Project      string
	Repository   string
}

type LatestIndex

type LatestIndex struct {
	Organization string `json:"organization"`
	Project      string `json:"project"`
	Repository   string `json:"repository"`
	Ref          string `json:"ref"`
}

type Ref

type Ref struct {
	Name   string `json:"name"`
	Latest string `json:"latest"`
}

Jump to

Keyboard shortcuts

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