model

package
v0.0.0-...-8e2a2c3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationFileName string = "configuration.toml" // Format Must Be TOML
View Source
const ConfirmationDeleteForkedRepository = "I AM REALLY SURE TO DELETE ALL FORKED REPOSITORY"
View Source
const DEBUG bool = true

Constant Value

View Source
const DirectoryName string = "DevOpsFactory"
View Source
const KeyringFileName string = "keyring.toml" // Format Must Be TOML
View Source
const ProjectDirectoryName string = "Project"
View Source
const ProjectFileName string = "projects.toml" // Format Must Be TOML
View Source
const SystemName string = "DevOpsFactory" // Don't Use any Space

Variables

This section is empty.

Functions

func GetPublicKey

func GetPublicKey() *ssh.PublicKeys

func VerifyGithub

func VerifyGithub(githubModel Github) bool

Types

type Configuration

type Configuration struct {
	Home   string
	Github Github
}

Default Configuration

func DefaultConfiguration

func DefaultConfiguration() Configuration

func GetConfiguration

func GetConfiguration() (Configuration, error)

func LoadConfiguration

func LoadConfiguration() Configuration

func (Configuration) GetConfigFilePath

func (configuration Configuration) GetConfigFilePath() string

func (Configuration) GetDirectoryPath

func (configuration Configuration) GetDirectoryPath() string

func (Configuration) GetGithubInformation

func (configuration Configuration) GetGithubInformation() Github

func (Configuration) GetKeyringConfigFilePath

func (configuration Configuration) GetKeyringConfigFilePath() string

func (Configuration) GetProjectConfigFilePath

func (configuration Configuration) GetProjectConfigFilePath() string

func (Configuration) GetProjectPath

func (configuration Configuration) GetProjectPath() string

func (Configuration) SaveConfiguration

func (configuration Configuration) SaveConfiguration()

func (Configuration) SetToken

func (configuration Configuration) SetToken(token string)

type Github

type Github struct {
	ID       int64
	Name     string
	Username string
	Token    string
}

func (Github) Client

func (githubModel Github) Client() github.Client

func (Github) Context

func (githubModel Github) Context() context.Context

type Keyring

type Keyring struct {
	Username string
	Host     string
	Port     string
	Password string `toml:"-"`
}

func GetKeyringFromString

func GetKeyringFromString(data string) Keyring

func (Keyring) Exist

func (keyringModel Keyring) Exist(configuration Configuration) bool

func (Keyring) GetHostPort

func (keyringModel Keyring) GetHostPort() string

func (Keyring) GetPasswordFromSystem

func (keyringModel Keyring) GetPasswordFromSystem() string

func (Keyring) GetSystemKeyringName

func (keyringModel Keyring) GetSystemKeyringName() string

func (Keyring) RemoveFromAll

func (keyringModel Keyring) RemoveFromAll(configuration Configuration)

func (Keyring) RemoveFromConfiguration

func (keyringModel Keyring) RemoveFromConfiguration(configuration Configuration)

func (Keyring) RemoveFromSystem

func (keyringModel Keyring) RemoveFromSystem()

func (Keyring) SaveFull

func (keyringModel Keyring) SaveFull(configuration Configuration)

func (Keyring) SaveToConfiguration

func (keyringModel Keyring) SaveToConfiguration(configuration Configuration)

func (Keyring) SaveToSystem

func (keyringModel Keyring) SaveToSystem()

type KeyringConfiguration

type KeyringConfiguration struct {
	Keyring []Keyring
}

func GetAllKeyringConfiguration

func GetAllKeyringConfiguration(configuration Configuration) KeyringConfiguration

type Project

type Project struct {
	ProjectName string
	Alias       string
	Path        string
}

func (Project) ExistByAlias

func (project Project) ExistByAlias(configuration Configuration) (bool, Project)

func (Project) FillFromAlias

func (project Project) FillFromAlias(configuration Configuration) (bool, Project)

func (Project) GitRepository

func (project Project) GitRepository(configuration Configuration) (*git.Repository, bool)

func (Project) Remove

func (project Project) Remove(configuration Configuration)

func (Project) Save

func (project Project) Save(configuration Configuration) bool

func (Project) UrlRepository

func (project Project) UrlRepository(configuration Configuration) string

type ProjectConfiguration

type ProjectConfiguration struct {
	Project []Project
}

func GetAllProjectConfiguration

func GetAllProjectConfiguration(configuration Configuration) ProjectConfiguration

Jump to

Keyboard shortcuts

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