Documentation
¶
Index ¶
- Constants
- func FromReader(reader io.Reader) *parser
- func GetTypeSpecProjectsFromConfig(config *Config, specRoot string) (tspProjects map[string][]TypeSpecPakcageInfo, errResult error)
- func ParseTrack2(config *Config, specRoot string) (armServices map[string][]common.PackageInfo, errResult error)
- type ArgumentOption
- type Config
- type FlagOption
- type KeyValueOption
- type Option
- type OptionType
- type Options
- type RefreshInfo
- type ReleaseRequestInfo
- type Track2ReleaseRequests
- type Track2Request
- type TypeSpecPakcageInfo
- type TypeSpecReleaseRequests
Constants ¶
const Root = "github.com/Azure/azure-sdk-for-go"
Variables ¶
This section is empty.
Functions ¶
func FromReader ¶
func GetTypeSpecProjectsFromConfig ¶
func GetTypeSpecProjectsFromConfig(config *Config, specRoot string) (tspProjects map[string][]TypeSpecPakcageInfo, errResult error)
func ParseTrack2 ¶
Types ¶
type ArgumentOption ¶
ArgumentOption is an option not starting with '--' or '-'
type Config ¶
type Config struct { Track2Requests Track2ReleaseRequests `json:"track2Requests,omitempty"` TypeSpecRequests TypeSpecReleaseRequests `json:"typespecRequests,omitempty"` RefreshInfo RefreshInfo `json:"refresh,omitempty"` AdditionalFlags []string `json:"additionalOptions,omitempty"` }
func ParseConfig ¶
func (Config) AdditionalOptions ¶
type FlagOption ¶
FlagOption is an option that starts with '--' but do not have a value
type KeyValueOption ¶
KeyValueOption is an option that starts with '--' and have a value
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 ¶
NewArgument returns a new argument option (without "--")
func NewFlagOption ¶
NewFlagOption returns a flag option (with "--", without value)
func NewKeyValueOption ¶
NewKeyValueOption returns a key-value option like "--tag=something"
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 ¶
MergeOptions will merge the given options and new option slice, and return a new Options instance
func NewOptions ¶
NewOptions returns a new instance of Options with the give slice of Option
func ParseOptions ¶
ParseOptions returns an Options instance by parsing the given raw option strings
type RefreshInfo ¶
type RefreshInfo struct { // AdditionalFlags are the additional options that will be used in the general refresh AdditionalFlags []string `json:"additionalOptions,omitempty"` // Packages are the full package identifier of the packages to refresh, eg 'github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight' Packages []string `json:"packages,omitempty"` }
func (RefreshInfo) AdditionalOptions ¶
func (r RefreshInfo) AdditionalOptions() ([]Option, error)
func (RefreshInfo) RelativePackages ¶
func (r RefreshInfo) RelativePackages() []string
func (RefreshInfo) String ¶
func (r RefreshInfo) String() string
type ReleaseRequestInfo ¶
type ReleaseRequestInfo struct { TargetDate *time.Time `json:"targetDate,omitempty"` RequestLink string `json:"requestLink,omitempty"` }
func (ReleaseRequestInfo) HasTargetDate ¶
func (info ReleaseRequestInfo) HasTargetDate() bool
func (ReleaseRequestInfo) String ¶
func (info ReleaseRequestInfo) String() string
type Track2ReleaseRequests ¶
type Track2ReleaseRequests map[string][]Track2Request
func (Track2ReleaseRequests) Add ¶
func (c Track2ReleaseRequests) Add(readme string, info Track2Request)
func (Track2ReleaseRequests) Contains ¶
func (c Track2ReleaseRequests) Contains(readme string) bool
func (Track2ReleaseRequests) String ¶
func (c Track2ReleaseRequests) String() string
type Track2Request ¶
type Track2Request struct { ReleaseRequestInfo PackageFlag string `json:"packageFlag,omitempty"` }
type TypeSpecPakcageInfo ¶
type TypeSpecPakcageInfo struct { common.PackageInfo TspConfigPath string }
type TypeSpecReleaseRequests ¶
type TypeSpecReleaseRequests map[string][]Track2Request
func (TypeSpecReleaseRequests) Add ¶
func (c TypeSpecReleaseRequests) Add(tspConfig string, info Track2Request)
func (TypeSpecReleaseRequests) Contains ¶
func (c TypeSpecReleaseRequests) Contains(tspConfig string) bool
func (TypeSpecReleaseRequests) String ¶
func (c TypeSpecReleaseRequests) String() string