config

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath() (string, error)

GetPath get the configuration file path.

func Save

func Save(configs []Configuration) error

Save save the configuration into a file.

Types

type Configuration

type Configuration struct {
	Directory    string                         `json:"directory,omitempty"`
	BaseRemote   string                         `json:"base_remote,omitempty"`
	PullRequests map[string][]types.PullRequest `json:"pull_requests,omitempty"`
}

Configuration is the global application configuration model.

func Find

func Find(configurations []Configuration, directory string) (*Configuration, error)

Find find a configuration by directory name.

func Get

func Get() (*Configuration, error)

Get configuration for the current directory

func ReadFile

func ReadFile() ([]Configuration, error)

ReadFile read or create the configuration file and load the configuration into an array.

func (*Configuration) FindPullRequests

func (c *Configuration) FindPullRequests(number int) (*types.PullRequest, error)

FindPullRequests find a pull request by number.

func (*Configuration) RemovePullRequest

func (c *Configuration) RemovePullRequest(pull *types.PullRequest) int

RemovePullRequest remove a pull request.

Jump to

Keyboard shortcuts

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