protocolsiocmd

package
v0.0.0-...-9ccf3cf Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 21 Imported by: 1

README

Package cloudeng.io/webapi/clients/protocolsio/protocolsiocmd

import cloudeng.io/webapi/clients/protocolsio/protocolsiocmd

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.

Functions

Func OptionsForEndpoint
func OptionsForEndpoint(cfg apicrawlcmd.Crawl[Service]) ([]operations.Option, error)

Types

Type Command
type Command struct {
	// contains filtered or unexported fields
}

Çommand implements the command line operations available for protocols.io.

Functions
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.

Methods
func (c *Command) Crawl(ctx context.Context, fv *CrawlFlags) error
func (c *Command) Get(ctx context.Context, _ *GetFlags, args []string) error
func (c *Command) ScanDownloaded(ctx context.Context, fv *ScanFlags) error
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             `subcmd:"key,,'string may contain any characters, numbers and special symbols. System will search around protocol name, description, authors. If the search keywords are enclosed in double quotes, then result contains only the exact match of the combined term'"`
}
Type GetFlags
type GetFlags struct{}
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.

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]) ([]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.

func (*Command) Crawl

func (c *Command) Crawl(ctx context.Context, fv *CrawlFlags) error

func (*Command) Get

func (c *Command) Get(ctx context.Context, _ *GetFlags, args []string) error

func (*Command) ScanDownloaded

func (c *Command) ScanDownloaded(ctx context.Context, fv *ScanFlags) error

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 GetFlags

type GetFlags struct{}

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.

Jump to

Keyboard shortcuts

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