models

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ReposCollection = "repos"

ReposCollection is the name of the repos collection

Variables

View Source
var OfficialRepos = []*Repo{
	{
		Name:   "stable",
		URL:    "https://kubernetes-charts.storage.googleapis.com",
		Source: "https://github.com/kubernetes/charts/tree/master/stable",
	},
	{
		Name:   "incubator",
		URL:    "https://kubernetes-charts-incubator.storage.googleapis.com",
		Source: "https://github.com/kubernetes/charts/tree/master/incubator",
	},
}

OfficialRepos are the official Kubernetes repos

Functions

func CreateRepo

func CreateRepo(db datastore.Database, repo *Repo) error

CreateRepo takes a Repo object and saves it to the database Repos with the same name are updated

func CreateRepos

func CreateRepos(db datastore.Database, repos []*Repo) error

CreateRepos takes an array of Repos and saves them to the database Repos with the same name are updated

func DeleteRepo

func DeleteRepo(db datastore.Database, name string) error

DeleteRepo by name

Types

type Repo

type Repo struct {
	ID     bson.ObjectId `json:"-" bson:"_id,omitempty"`
	Name   string        `json:"name" valid:"alpha,required"`
	URL    string        `json:"url" valid:"url,required"`
	Source string        `json:"source"`
}

Repo describes a chart repository

func GetRepo

func GetRepo(db datastore.Database, name string) (*Repo, error)

GetRepo by name

func ListRepos

func ListRepos(db datastore.Database) ([]*Repo, error)

ListRepos returns a list of all repos

Jump to

Keyboard shortcuts

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