cli

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSessionFolder string

Functions

func DefaultArgsShellComp added in v1.3.2

func DefaultArgsShellComp(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func PromtForLogin

func PromtForLogin() (loginRequest *auth.LoginRequest, err error)

func ValidArgsGetMetrics added in v1.3.2

func ValidArgsGetMetrics(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func ValidArgsGetTools added in v1.3.2

func ValidArgsGetTools(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

Types

type Session

type Session struct {
	URL   string `json:"url"`
	Token string `json:"token"`

	Folder string `json:"-"`

	*grpc.ClientConn
}

func ContinueSession

func ContinueSession() (session *Session, err error)

func NewSession

func NewSession(url string, opts ...grpc.DialOption) (session *Session, err error)

func (*Session) AuthenticatedContext added in v1.3.2

func (s *Session) AuthenticatedContext(ctx context.Context) context.Context

func (*Session) HandleResponse

func (s *Session) HandleResponse(msg proto.Message, err error) error

HandleResponse handles the response and error message of an gRPC call

func (*Session) Invoke added in v1.3.2

func (s *Session) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

Invoke implements `grpc.ClientConnInterface` and automatically provides an authenticated context of this session

func (*Session) NewStream added in v1.3.2

func (s *Session) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

NewStream implements `grpc.ClientConnInterface` and automatically provides an authenticated context of this session

func (*Session) Save

func (s *Session) Save() (err error)

Save saves the session into the `.clouditor` folder in the home directory

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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