adminutils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllNamedEntities

func GetAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, req ListRequest, opts ...grpc.CallOption) ([]*admin.NamedEntityIdentifier, error)

func IterateThroughAllNamedEntities

func IterateThroughAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, visitor NamedEntityVisitor, req ListRequest, opts ...grpc.CallOption) error

func NamedEntityToProtoMessage

func NamedEntityToProtoMessage(l []*admin.NamedEntityIdentifier) []proto.Message

Types

type Config

type Config struct {
	MaxRecords int `json:"maxRecords" pflag:",Maximum number of records to retrieve."`
	BatchSize  int `json:"batchSize" pflag:",Maximum number of records to retrieve per call."`
}

func GetConfig

func GetConfig() *Config

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type ListRequest

type ListRequest struct {
	Project string
	Domain  string
	Filters string
}

type NamedEntityVisitor

type NamedEntityVisitor func(entities []*admin.NamedEntityIdentifier) error

Jump to

Keyboard shortcuts

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