Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFlagSet

func DefaultFlagSet() *flag.FlagSet

DefaultFlagSet returns the default flags (flagset) for running the commandline `api` application.

func Run

func Run(ctx context.Context) error

Run will execute the commandline `api` application using the default flags and `RunOptions`.

func RunWithFlagSet

func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet) error

Run will execute the commandline `api` application using `RunOptions` derived from 'fs'.

func RunWithOptions

func RunWithOptions(ctx context.Context, opts *RunOptions) error

Run will execute the commandline `api` application using `RunOptions`.

Types

type RunOptions

type RunOptions struct {
	// The HTTP verb to execute an API method with.
	Verb string
	// A valid `sfomuseum/go-sfomuseum-api/client.Client` URI.
	APIClientURI string
	// One or more query parameters to execute an API method with (at a minimum the "method" parameter is required).
	Args *url.Values
}

RunOptions defines options and configurations to execute the commandline `api` application with.

func RunOptionsFromFlagSet

func RunOptionsFromFlagSet(fs *flag.FlagSet) (*RunOptions, error)

RunOptionsFromFlagSet will return a new `RunOptions` for use with the commandline `api` application derived from 'fs'.

Jump to

Keyboard shortcuts

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