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

collections

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:              "collections",
	Short:            "Utilities to read collections",
	TraverseChildren: true,
}
View Source
var GetCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "get <collection_id>",
		Short:   "Get collection info",
		Example: "flow collections get 270d...9c31e",
		Args:    cobra.ExactArgs(1),
	},
	Flags: &collectionFlags,
	Run: func(
		cmd *cobra.Command,
		args []string,
		globalFlags command.GlobalFlags,
		services *services.Services,
	) (command.Result, error) {
		collection, err := services.Collections.Get(args[0])
		if err != nil {
			return nil, err
		}

		return &CollectionResult{collection}, nil
	},
}

Functions

This section is empty.

Types

type CollectionResult

type CollectionResult struct {
	*flow.Collection
}

CollectionResult

func (*CollectionResult) JSON

func (c *CollectionResult) JSON() interface{}

JSON convert result to JSON

func (*CollectionResult) Oneliner

func (c *CollectionResult) Oneliner() string

Oneliner show result as one liner grep friendly

func (*CollectionResult) String

func (c *CollectionResult) String() string

String convert result to string

Jump to

Keyboard shortcuts

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