Documentation ¶
Overview ¶
Package protocolsio provides support for working with the protocols.io API. It currently provides the ability to crawl public protocols.
Package protocolsiocmd provides support for building command line tools that access protocols.io.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionsForEndpoint ¶
func OptionsForEndpoint(cfg apicrawlcmd.Crawl[Service], token *apitokens.T) ([]operations.Option, error)
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Çommand implements the command line operations available for protocols.io.
func NewCommand ¶
func NewCommand(ctx context.Context, config apicrawlcmd.Crawl[yaml.Node], resources apicrawlcmd.Resources) (*Command, error)
NewCommand returns a new Command instance for protocols.io API related commands.
type CrawlFlags ¶
type CrawlFlags struct { Save bool `subcmd:"save,true,'save downloaded protocols to disk'"` IgnoreCheckpoint bool `subcmd:"ignore-checkpoint,false,'ignore the checkpoint files'"` Pages flags.IntRangeSpec `subcmd:"pages,,page range to return"` PageSize int `subcmd:"size,50,number of items in each page"` Key string `` /* 259-byte string literal not displayed */ }
type ScanFlags ¶
type ScanFlags struct {
Template string `subcmd:"template,'{{.ID}}',template to use for printing fields in the downloaded Protocol objects"`
}
type Service ¶
type Service struct { Filter string `yaml:"filter" cmd:"filter to apply to protocols.io API calls, typically public"` OrderField string `yaml:"order_field" cmd:"field used to order API responses, typically id"` OrderDirection string `yaml:"order_direction" cmd:"order direction to apply to protocols.io API calls, typically asc"` Incremental bool `yaml:"incremental" cmd:"if true, only download new or updated protocols"` }
Service represents the protocols.io specific confiugaration options.
Click to show internal directories.
Click to hide internal directories.