model

package
v0.0.0-...-414bed5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortFuncItem

func SortFuncItem[T delta.FuncSig | exports.Func](change map[string]T) []string

Types

type ArgumentOption

type ArgumentOption interface {
	Option
	Argument() string
}

ArgumentOption is an option not starting with '--' or '-'

type Changelog

type Changelog struct {
	// NewPackage is true if this package does not exist in the old version
	NewPackage bool
	// RemovedPackage is true if this package does not exist in the new version
	RemovedPackage bool
	// Modified contains the details of a modified package. This is nil when either NewPackage or RemovedPackage is true
	Modified *report.Package
}

Changelog describes the changelog generated for a package.

func (Changelog) GetBreakingChangeItems

func (c Changelog) GetBreakingChangeItems() []string

GetBreakingChangeItems returns an array of the breaking change items

func (Changelog) GetChangeSummary

func (c Changelog) GetChangeSummary() string

Seperate change summary text get

func (Changelog) HasBreakingChanges

func (c Changelog) HasBreakingChanges() bool

HasBreakingChanges returns if this report of changelog contains breaking changes

func (Changelog) String

func (c Changelog) String() string

String ...

func (Changelog) ToCompactMarkdown

func (c Changelog) ToCompactMarkdown() string

ToCompactMarkdown returns the markdown string of this changelog but more compact

func (Changelog) ToMarkdown

func (c Changelog) ToMarkdown() string

ToMarkdown returns the markdown string of this changelog

type FlagOption

type FlagOption interface {
	Option
	Flag() string
}

FlagOption is an option that starts with '--' but do not have a value

type GenerateOptions

type GenerateOptions struct {
	AutorestArguments []string `json:"autorestArguments"`
	AdditionalOptions []string `json:"additionalOptions,omitempty"`
}

GenerateOptions deserialize from eng/generate_options.json file in root directory of azure-sdk-for-go

func NewGenerateOptionsFrom

func NewGenerateOptionsFrom(reader io.Reader) (*GenerateOptions, error)

NewGenerateOptionsFrom reads GenerateOptions from the given io.Reader

type KeyValueOption

type KeyValueOption interface {
	Option
	Key() string
	Value() string
}

KeyValueOption is an option that starts with '--' and have a value

type Metadata

type Metadata interface {
	// SwaggerFiles returns the related swagger files in this tag
	SwaggerFiles() []string
	// PackagePath returns the output package path of this tag
	PackagePath() string
	// Namespace returns the namespace of this tag
	Namespace() string
}

Metadata ...

func NewMetadataFrom

func NewMetadataFrom(reader io.Reader) (Metadata, error)

NewMetadataFrom reads a new Metadata from a io.Reader

type Option

type Option interface {
	// Type returns the type of this option
	Type() OptionType
	// Format returns the actual option in string
	Format() string
}

Option describes an option of a autorest command line

func NewArgument

func NewArgument(value string) Option

NewArgument returns a new argument option (without "--")

func NewFlagOption

func NewFlagOption(flag string) Option

NewFlagOption returns a flag option (with "--", without value)

func NewKeyValueOption

func NewKeyValueOption(key, value string) Option

NewKeyValueOption returns a key-value option like "--tag=something"

func NewOption

func NewOption(input string) (Option, error)

NewOption returns an Option from a formatted string. We should hold this result using this function: input == result.Format()

type OptionType

type OptionType string

OptionType describes the type of the option, possible values are 'Argument', 'Flag' or 'KeyValue'

const (
	// Argument ...
	Argument OptionType = "Argument"
	// Flag ...
	Flag OptionType = "Flag"
	// KeyValue ...
	KeyValue OptionType = "KeyValue"
)

type Options

type Options interface {
	// Arguments returns the argument defined in this options
	Arguments() []Option
	// CodeGeneratorVersion returns the code generator version defined in this options
	CodeGeneratorVersion() string
	// MergeOptions merges the current options with the given options
	MergeOptions(other ...Option) Options
}

Options ...

func MergeOptions

func MergeOptions(options Options, other ...Option) Options

MergeOptions will merge the given options and new option slice, and return a new Options instance

func NewOptions

func NewOptions(options ...Option) Options

NewOptions returns a new instance of Options with the give slice of Option

func ParseOptions

func ParseOptions(raw []string) (Options, error)

ParseOptions returns an Options instance by parsing the given raw option strings

type RawOptions

type RawOptions struct {
	AutorestArguments []string `json:"autorestArguments,omitempty"`
}

func NewRawOptionsFrom

func NewRawOptionsFrom(reader io.Reader) (*RawOptions, error)

func (RawOptions) Parse

func (r RawOptions) Parse(absSDK string) (Options, error)

Jump to

Keyboard shortcuts

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