avcli

package module
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 17 Imported by: 5

README

av-cli

Linux Installation:
  1. Download the binary from the Releases section.
  2. Give the file executable permissions and rename it to "av".
  3. Move the file to somewhere in your path.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_av_cli_proto protoreflect.FileDescriptor

Functions

func GetNetID

func GetNetID(ctx context.Context) (string, error)

func NewSSHClient

func NewSSHClient(address string) (*ssh.Client, error)

NewSSHClient .

func RegisterAvCliServer

func RegisterAvCliServer(s *grpc.Server, srv AvCliServer)

Types

type Auth

type Auth struct {
	Token string
	User  string
}

func (Auth) GetRequestMetadata

func (a Auth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

func (Auth) RequireTransportSecurity

func (Auth) RequireTransportSecurity() bool

type AvCliClient

type AvCliClient interface {
	Swab(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_SwabClient, error)
	Float(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_FloatClient, error)
	Screenshot(ctx context.Context, in *ID, opts ...grpc.CallOption) (*ScreenshotResult, error)
	DuplicateRoom(ctx context.Context, in *DuplicateRoomRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	FixTime(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_FixTimeClient, error)
	Sink(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_SinkClient, error)
	CloseMonitoringIssue(ctx context.Context, in *ID, opts ...grpc.CallOption) (*empty.Empty, error)
	SetLogLevel(ctx context.Context, in *SetLogLevelRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

AvCliClient is the client API for AvCli service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAvCliClient

func NewAvCliClient(cc grpc.ClientConnInterface) AvCliClient

type AvCliServer

type AvCliServer interface {
	Swab(*ID, AvCli_SwabServer) error
	Float(*ID, AvCli_FloatServer) error
	Screenshot(context.Context, *ID) (*ScreenshotResult, error)
	DuplicateRoom(context.Context, *DuplicateRoomRequest) (*empty.Empty, error)
	FixTime(*ID, AvCli_FixTimeServer) error
	Sink(*ID, AvCli_SinkServer) error
	CloseMonitoringIssue(context.Context, *ID) (*empty.Empty, error)
	SetLogLevel(context.Context, *SetLogLevelRequest) (*empty.Empty, error)
}

AvCliServer is the server API for AvCli service.

type AvCli_FixTimeClient

type AvCli_FixTimeClient interface {
	Recv() (*IDResult, error)
	grpc.ClientStream
}

type AvCli_FixTimeServer

type AvCli_FixTimeServer interface {
	Send(*IDResult) error
	grpc.ServerStream
}

type AvCli_FloatClient

type AvCli_FloatClient interface {
	Recv() (*IDResult, error)
	grpc.ClientStream
}

type AvCli_FloatServer

type AvCli_FloatServer interface {
	Send(*IDResult) error
	grpc.ServerStream
}

type AvCli_SinkClient

type AvCli_SinkClient interface {
	Recv() (*IDResult, error)
	grpc.ClientStream
}

type AvCli_SinkServer

type AvCli_SinkServer interface {
	Send(*IDResult) error
	grpc.ServerStream
}

type AvCli_SwabClient

type AvCli_SwabClient interface {
	Recv() (*IDResult, error)
	grpc.ClientStream
}

type AvCli_SwabServer

type AvCli_SwabServer interface {
	Send(*IDResult) error
	grpc.ServerStream
}

type Client

type Client struct {
	Auth Auth
	// contains filtered or unexported fields
}

func NewClient

func NewClient(addr string, a Auth, opts ...grpc.DialOption) (*Client, error)

func (*Client) CloseMonitoringIssue

func (c *Client) CloseMonitoringIssue(ctx context.Context, in *ID, opts ...grpc.CallOption) (*empty.Empty, error)

func (*Client) DuplicateRoom

func (c *Client) DuplicateRoom(ctx context.Context, in *DuplicateRoomRequest, opts ...grpc.CallOption) (*empty.Empty, error)

func (*Client) FixTime

func (c *Client) FixTime(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_FixTimeClient, error)

func (*Client) Float

func (c *Client) Float(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_FloatClient, error)

func (*Client) Screenshot

func (c *Client) Screenshot(ctx context.Context, in *ID, opts ...grpc.CallOption) (*ScreenshotResult, error)

func (*Client) SetLogLevel

func (c *Client) SetLogLevel(ctx context.Context, in *SetLogLevelRequest, opts ...grpc.CallOption) (*empty.Empty, error)

func (*Client) Sink

func (c *Client) Sink(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_SinkClient, error)

func (*Client) Swab

func (c *Client) Swab(ctx context.Context, in *ID, opts ...grpc.CallOption) (AvCli_SwabClient, error)

type DataService added in v1.1.0

type DataService interface {
	Room(context.Context, string) ([]Pi, error)
	Device(context.Context, string) (Pi, error)
}

type DuplicateRoomRequest

type DuplicateRoomRequest struct {
	FromID          string `protobuf:"bytes,1,opt,name=fromID,proto3" json:"fromID,omitempty"`
	FromDesignation string `protobuf:"bytes,2,opt,name=fromDesignation,proto3" json:"fromDesignation,omitempty"`
	ToID            string `protobuf:"bytes,3,opt,name=toID,proto3" json:"toID,omitempty"`
	ToDesignation   string `protobuf:"bytes,4,opt,name=toDesignation,proto3" json:"toDesignation,omitempty"`
	// contains filtered or unexported fields
}

func (*DuplicateRoomRequest) Descriptor deprecated

func (*DuplicateRoomRequest) Descriptor() ([]byte, []int)

Deprecated: Use DuplicateRoomRequest.ProtoReflect.Descriptor instead.

func (*DuplicateRoomRequest) GetFromDesignation

func (x *DuplicateRoomRequest) GetFromDesignation() string

func (*DuplicateRoomRequest) GetFromID

func (x *DuplicateRoomRequest) GetFromID() string

func (*DuplicateRoomRequest) GetToDesignation

func (x *DuplicateRoomRequest) GetToDesignation() string

func (*DuplicateRoomRequest) GetToID

func (x *DuplicateRoomRequest) GetToID() string

func (*DuplicateRoomRequest) ProtoMessage

func (*DuplicateRoomRequest) ProtoMessage()

func (*DuplicateRoomRequest) ProtoReflect

func (x *DuplicateRoomRequest) ProtoReflect() protoreflect.Message

func (*DuplicateRoomRequest) Reset

func (x *DuplicateRoomRequest) Reset()

func (*DuplicateRoomRequest) String

func (x *DuplicateRoomRequest) String() string

type ID

type ID struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Designation string `protobuf:"bytes,2,opt,name=designation,proto3" json:"designation,omitempty"`
	// contains filtered or unexported fields
}

func (*ID) Descriptor deprecated

func (*ID) Descriptor() ([]byte, []int)

Deprecated: Use ID.ProtoReflect.Descriptor instead.

func (*ID) GetDesignation

func (x *ID) GetDesignation() string

func (*ID) GetId

func (x *ID) GetId() string

func (*ID) ProtoMessage

func (*ID) ProtoMessage()

func (*ID) ProtoReflect

func (x *ID) ProtoReflect() protoreflect.Message

func (*ID) Reset

func (x *ID) Reset()

func (*ID) String

func (x *ID) String() string

type IDResult

type IDResult struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*IDResult) Descriptor deprecated

func (*IDResult) Descriptor() ([]byte, []int)

Deprecated: Use IDResult.ProtoReflect.Descriptor instead.

func (*IDResult) GetError

func (x *IDResult) GetError() string

func (*IDResult) GetId

func (x *IDResult) GetId() string

func (*IDResult) ProtoMessage

func (*IDResult) ProtoMessage()

func (*IDResult) ProtoReflect

func (x *IDResult) ProtoReflect() protoreflect.Message

func (*IDResult) Reset

func (x *IDResult) Reset()

func (*IDResult) String

func (x *IDResult) String() string

type Pi added in v1.1.0

type Pi struct {
	ID      string
	Address string
	Type    string
}

type ScreenshotResult

type ScreenshotResult struct {
	Photo []byte `protobuf:"bytes,1,opt,name=photo,proto3" json:"photo,omitempty"`
	// contains filtered or unexported fields
}

func (*ScreenshotResult) Descriptor deprecated

func (*ScreenshotResult) Descriptor() ([]byte, []int)

Deprecated: Use ScreenshotResult.ProtoReflect.Descriptor instead.

func (*ScreenshotResult) GetPhoto

func (x *ScreenshotResult) GetPhoto() []byte

func (*ScreenshotResult) ProtoMessage

func (*ScreenshotResult) ProtoMessage()

func (*ScreenshotResult) ProtoReflect

func (x *ScreenshotResult) ProtoReflect() protoreflect.Message

func (*ScreenshotResult) Reset

func (x *ScreenshotResult) Reset()

func (*ScreenshotResult) String

func (x *ScreenshotResult) String() string

type SetLogLevelRequest

type SetLogLevelRequest struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Port  int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Level int32  `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*SetLogLevelRequest) Descriptor deprecated

func (*SetLogLevelRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetLogLevelRequest.ProtoReflect.Descriptor instead.

func (*SetLogLevelRequest) GetId

func (x *SetLogLevelRequest) GetId() string

func (*SetLogLevelRequest) GetLevel

func (x *SetLogLevelRequest) GetLevel() int32

func (*SetLogLevelRequest) GetPort

func (x *SetLogLevelRequest) GetPort() int32

func (*SetLogLevelRequest) ProtoMessage

func (*SetLogLevelRequest) ProtoMessage()

func (*SetLogLevelRequest) ProtoReflect

func (x *SetLogLevelRequest) ProtoReflect() protoreflect.Message

func (*SetLogLevelRequest) Reset

func (x *SetLogLevelRequest) Reset()

func (*SetLogLevelRequest) String

func (x *SetLogLevelRequest) String() string

type UnimplementedAvCliServer

type UnimplementedAvCliServer struct {
}

UnimplementedAvCliServer can be embedded to have forward compatible implementations.

func (*UnimplementedAvCliServer) CloseMonitoringIssue

func (*UnimplementedAvCliServer) CloseMonitoringIssue(context.Context, *ID) (*empty.Empty, error)

func (*UnimplementedAvCliServer) DuplicateRoom

func (*UnimplementedAvCliServer) FixTime

func (*UnimplementedAvCliServer) Float

func (*UnimplementedAvCliServer) Screenshot

func (*UnimplementedAvCliServer) SetLogLevel

func (*UnimplementedAvCliServer) Sink

func (*UnimplementedAvCliServer) Swab

Jump to

Keyboard shortcuts

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