Documentation ¶
Index ¶
- Variables
- func DefaultArgsShellComp(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func PromptForLogin() (loginRequest *auth.LoginRequest, err error)
- func ValidArgsGetCloudServices(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func ValidArgsGetMetrics(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func ValidArgsGetTools(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- type GRPCFormatter
- type Session
- func (s *Session) AuthenticatedContext(ctx context.Context) context.Context
- func (*Session) HandleResponse(msg proto.Message, err error) error
- func (s *Session) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, ...) error
- func (s *Session) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error)
- func (s *Session) Save() (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSessionFolder string
View Source
var Output io.Writer = os.Stdout
Functions ¶
func DefaultArgsShellComp ¶ added in v1.3.2
func PromptForLogin ¶ added in v1.3.11
func PromptForLogin() (loginRequest *auth.LoginRequest, err error)
func ValidArgsGetCloudServices ¶ added in v1.3.11
func ValidArgsGetMetrics ¶ added in v1.3.2
func ValidArgsGetTools ¶ added in v1.3.2
Types ¶
type GRPCFormatter ¶ added in v1.3.7
type GRPCFormatter struct {
logrus.TextFormatter
}
type Session ¶
type Session struct { URL string `json:"url"` Token string `json:"token"` Folder string `json:"-"` *grpc.ClientConn }
func ContinueSession ¶
func NewSession ¶
func NewSession(url string, opts ...grpc.DialOption) (session *Session, err error)
func (*Session) AuthenticatedContext ¶ added in v1.3.2
func (*Session) HandleResponse ¶
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
Click to show internal directories.
Click to hide internal directories.