storage

package
v0.0.0-...-be0cd49 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 12 Imported by: 4

Documentation

Overview

Package storage is a file system abstraction for storing Kepler data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(cli *cli.Cli)

AddCommands for this module

func Delete

func Delete() error

Delete storage

func Exists

func Exists(override ...string) (bool, error)

Exists checks if .kepler file has been set

func ShowStorage

func ShowStorage() error

ShowStorage in kepler

Types

type Github

type Github struct {
	AccessToken  string  `json:"accesstoken"`
	Issue        []Issue `json:"issue"`
	Organisation string  `json:"SeedJobs"`
	TeamID       int64   `json:"teamid"`
	CurrentIssue *Issue  `json:"currentissue"`
}

Github specific sub structure

type Issue

type Issue struct {
	IssueURL     string        `json:"issueurl"`
	Owner        string        `json:"owner"`
	Repo         string        `json:"repo"`
	Number       int           `json:"number"`
	PullRequests []PullRequest `json:"pullrequests"`
	Palette      map[string]string
}

Issue object structure

type Kubebuilder

type Kubebuilder struct {
	ProjectName string `json:"projectname"`
	TopicName   string `json:"topicname"`
	SubName     string `json:"subscriptionname"`
}

Kubebuilder specific sub structure

type PullRequest

type PullRequest struct {
	Repo   string
	Owner  string
	Base   string
	Head   string
	Title  string
	Number int
}

PullRequest object structure

type Storage

type Storage struct {
	Github      *Github       `json:"github"`
	Kubebuilder *Kubebuilder  `json:"kubebuilder"`
	GCRAuth     *oauth2.Token `json:"GCRAuth"`
}

Storage structure

func GetInstance

func GetInstance() *Storage

GetInstance reference to the singleton

func Load

func Load() (*Storage, error)

Load from kepler storage

func (*Storage) Save

func (s *Storage) Save() error

Save to kepler storage

Jump to

Keyboard shortcuts

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