models

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveRepoData

func SaveRepoData(key string)

Types

type Dependency

type Dependency struct {
	Repository string

	UseSSH bool
	// contains filtered or unexported fields
}

func GetDependencies

func GetDependencies(deps map[string]interface{}) []Dependency

func ParseDependency

func ParseDependency(repo string, info string) Dependency

func (*Dependency) GetHashName

func (d *Dependency) GetHashName() string

func (*Dependency) GetName

func (d *Dependency) GetName() string

func (*Dependency) GetURL

func (d *Dependency) GetURL() string

func (*Dependency) GetURLPrefix

func (d *Dependency) GetURLPrefix() string

func (*Dependency) GetVersion

func (d *Dependency) GetVersion() string

type Dependencyes

type Dependencyes struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Hash    string `json:"hash"`
}

type Package

type Package struct {
	IsNew        bool        `json:"-"`
	Name         string      `json:"name"`
	Description  string      `json:"description"`
	Version      string      `json:"version"`
	Homepage     string      `json:"homepage"`
	MainSrc      string      `json:"mainsrc"`
	Projects     []string    `json:"projects"`
	Scripts      interface{} `json:"scripts,omitempty"`
	Dependencies interface{} `json:"dependencies"`
	// contains filtered or unexported fields
}

func LoadPackage

func LoadPackage(createNew bool) (*Package, error)

func LoadPackageOther

func LoadPackageOther(path string) (*Package, error)

func (*Package) AddDependency

func (p *Package) AddDependency(dep string, ver string)

func (*Package) AddProject

func (p *Package) AddProject(project string)

func (*Package) RemoveDependency

func (p *Package) RemoveDependency(dep string)

func (*Package) Save

func (p *Package) Save()

type PackageLock

type PackageLock struct {
	// contains filtered or unexported fields
}

type RepoInfo

type RepoInfo struct {
	Key        string    `json:"key"`
	LastUpdate time.Time `json:"last_update"`
}

func RepoData

func RepoData(key string) (*RepoInfo, error)

RepoData retrieves cached information about a repo.

Jump to

Keyboard shortcuts

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