config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateService

type CreateService interface {
	Create(p string, force bool) (string, error)
}

CreateService is the service interface to create config files

type CreateServiceObj

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

CreateServiceObj implements the CreateService interface per default

func NewCreateService

func NewCreateService(apiKey, email, zone string) *CreateServiceObj

NewCreateService returns an pointer instance of CreateServiceObj with default values

func (*CreateServiceObj) Create

func (serv *CreateServiceObj) Create(p string, force bool) (string, error)

Create takes care to create a new config file with a default profile under the given path

type ProfileAddService

type ProfileAddService interface {
	AddNewProfile(profile *model.ConfigProfile, forceOverwrite bool) error
}

ProfileAddService is the service interface for operations to add profiles to config files

type ProfileAddServiceObj

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

ProfileAddServiceObj implements the ProfileAddService interface per default

func NewProfileAddService

func NewProfileAddService(configFilepath string) *ProfileAddServiceObj

NewProfileAddService returns a new pointer instance of ProfileAddServiceObj default values

func (*ProfileAddServiceObj) AddNewProfile

func (serv *ProfileAddServiceObj) AddNewProfile(profile *model.ConfigProfile, forceOverwrite bool) error

AddNewProfile will add a new profile to the specified config file

type ProfileDeleteService

type ProfileDeleteService interface {
	DeleteProfile(name string) error
}

ProfileDeleteService is the service interface for operations to delete profiles from config files

type ProfileDeleteServiceObj

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

ProfileDeleteServiceObj implements the ProfileDeleteService interface per default

func NewProfileDeleteService

func NewProfileDeleteService(configFilepath string) *ProfileDeleteServiceObj

NewProfileDeleteService returns a new pointer instance of ProfileDeleteServiceObj with default values

func (*ProfileDeleteServiceObj) DeleteProfile

func (serv *ProfileDeleteServiceObj) DeleteProfile(name string) error

DeleteProfile will delete a config profile with the given name from the config file if present

type ProfileListService

type ProfileListService interface {
	Get() (*map[string]*model.ConfigProfile, error)
}

ProfileListService is the service interface for operations to list profiles from config files

type ProfileListServiceObj

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

ProfileListServiceObj implements the ProfileListService per default

func NewProfileListService

func NewProfileListService(configFilepath string) *ProfileListServiceObj

NewProfileListService returns a new pointer instance of ProfileListServiceObj with default values

func (*ProfileListServiceObj) Get

Get the list of available profiles in the given config file

Jump to

Keyboard shortcuts

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