build

package
v0.0.0-...-4a61b4d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandInit

func CommandInit(log logger.Logger) *cobra.Command

CommandInit is used to initialize the configuration file in the current directory

func GetDefaultConfig

func GetDefaultConfig() *configs.Config

GetDefaultConfig is used to get default config

func GetWellKnownPluginsOptionValues

func GetWellKnownPluginsOptionValues() []string

GetWellKnownPluginsOptionValues is used to get option values of well known plugins

func GetWellKnownRepositoriesOptionValues

func GetWellKnownRepositoriesOptionValues() []string

GetWellKnownRepositoriesOptionValues is used to get option values of well known plugins

Types

type Plugin

type Plugin struct {
	OptionsValue string

	Name    string
	Pkg     string
	Options []string
}

Plugin defines the plugin options

func GetPluginFromOptionsValue

func GetPluginFromOptionsValue(val string) (*Plugin, bool)

GetPluginFromOptionsValue is used to get plugin by option value

func GetPluginProtocGenGo

func GetPluginProtocGenGo() *Plugin

GetPluginProtocGenGo is used to get protoc-gen-go plugin

func GetPluginProtocGenGoGRPC

func GetPluginProtocGenGoGRPC() *Plugin

GetPluginProtocGenGoGRPC is used to get protoc-gen-go-grpc plugin

func GetWellKnownPlugins

func GetWellKnownPlugins() []*Plugin

GetWellKnownPlugins is used to get well known plugins

func (*Plugin) GetOptionsValue

func (plugin *Plugin) GetOptionsValue() string

GetOptionsValue is used to get options value of plugin

type Repository

type Repository struct {
	OptionsValue string

	Name        string
	Pkg         string
	ImportPaths []string
}

Repository defines the plugin options

func GetRepositoryFromOptionsValue

func GetRepositoryFromOptionsValue(val string) (*Repository, bool)

GetRepositoryFromOptionsValue is used to get plugin by option value

func GetRepositoryGoGoProtobuf

func GetRepositoryGoGoProtobuf() *Repository

GetRepositoryGoGoProtobuf is used to get gogo protobuf repository

func GetRepositoryGoogleAPIs

func GetRepositoryGoogleAPIs() *Repository

GetRepositoryGoogleAPIs is used to get google apis repository

func GetWellKnownRepositories

func GetWellKnownRepositories() []*Repository

GetWellKnownRepositories is used to get well known plugins

func (*Repository) GetOptionsValue

func (repo *Repository) GetOptionsValue() string

OptionsValue is used to return the options value

type UserPreference

type UserPreference struct {
	Plugins      []string `survey:"plugins"`
	Repositories []string `survey:"repositories"`
}

UserPreference defines the model of user preference

func GetUserPreference

func GetUserPreference() (*UserPreference, error)

GetUserPreference is used to get user preference

Jump to

Keyboard shortcuts

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