initialization

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package initialization responsible for initializing the configuration of EasyP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BUFConfig

type BUFConfig struct {
	Version  string   `yaml:"version"`
	Deps     []string `yaml:"deps"`
	Build    Build    `yaml:"build"`
	Lint     Lint     `yaml:"lint"`
	Breaking Breaking `yaml:"breaking"`
}

BUFConfig is the configuration for the buf tool.

type Breaking

type Breaking struct {
	Use                    []string            `yaml:"use"`
	Except                 []string            `yaml:"except"`
	Ignore                 []string            `yaml:"ignore"`
	IgnoreOnly             map[string][]string `yaml:"ignore_only"`
	IgnoreUnstablePackages bool                `yaml:"ignore_unstable_packages"`
}

Breaking is the configuration for the breaking section of the buf tool.

type Build

type Build struct {
	Excludes []string `yaml:"excludes"`
}

Build is the configuration for the build section of the buf tool.

type EasyPConfig

type EasyPConfig struct {
	Version  string   `yaml:"version"`
	Deps     []string `yaml:"deps"`
	Build    Build    `yaml:"build"`
	Lint     Lint     `yaml:"lint"`
	Breaking Breaking `yaml:"breaking"`
}

EasyPConfig is the configuration for EasyP.

type FS

type FS interface {
	fs.FS
	// Create creates a file.
	Create(name string) (*os.File, error)
}

FS is the interface for the file system.

type Init

type Init struct{}

Init is a handler for initialization EasyP configuration.

func New

func New() *Init

New creates a new Lint.

func (*Init) Initialize

func (i *Init) Initialize(ctx context.Context, disk FS, defaultLinters []string) error

Initialize initializes the EasyP configuration.

type Lint

type Lint struct {
	Use                                  []string            `yaml:"use"`
	Except                               []string            `yaml:"except"`
	Ignore                               []string            `yaml:"ignore"`
	IgnoreOnly                           map[string][]string `yaml:"ignore_only"`
	AllowCommentIgnores                  bool                `yaml:"allow_comment_ignores"`
	EnumZeroValueSuffix                  string              `yaml:"enum_zero_value_suffix"`
	RPCAllowSameRequestResponse          bool                `yaml:"rpc_allow_same_request_response"`
	RPCAllowGoogleProtobufEmptyRequests  bool                `yaml:"rpc_allow_google_protobuf_empty_requests"`
	RPCAllowGoogleProtobufEmptyResponses bool                `yaml:"rpc_allow_google_protobuf_empty_responses"`
	ServiceSuffix                        string              `yaml:"service_suffix"`
}

Lint is the configuration for the lint section of the buf tool.

type Migrate

type Migrate struct {
	BUF *BUFConfig
}

Migrate contains original configuration for the migration.

Jump to

Keyboard shortcuts

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