emironetwork

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoCurl

func DoCurl(host string, port int, method string, index string, additionalURL string, insecure bool, query io.Reader) ([]byte, error)

func RegisterEmiroServer

func RegisterEmiroServer(s *grpc.Server, srv EmiroServer)

Types

type Answer

type Answer struct {
	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description          string            `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Command              string            `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
	Language             string            `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
	Path                 string            `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	Script               bool              `protobuf:"varint,6,opt,name=script,proto3" json:"script,omitempty"`
	Interactive          bool              `protobuf:"varint,7,opt,name=interactive,proto3" json:"interactive,omitempty"`
	Os                   []string          `protobuf:"bytes,8,rep,name=os,proto3" json:"os,omitempty"`
	Params               map[string]string `` /* 153-byte string literal not displayed */
	RemoteOutput         string            `protobuf:"bytes,10,opt,name=remoteOutput,proto3" json:"remoteOutput,omitempty"`
	Id                   string            `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"`
	Author               string            `protobuf:"bytes,12,opt,name=author,proto3" json:"author,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Answer) Descriptor

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

func (*Answer) GetAuthor

func (m *Answer) GetAuthor() string

func (*Answer) GetCommand

func (m *Answer) GetCommand() string

func (*Answer) GetDescription

func (m *Answer) GetDescription() string

func (*Answer) GetId

func (m *Answer) GetId() string

func (*Answer) GetInteractive

func (m *Answer) GetInteractive() bool

func (*Answer) GetLanguage

func (m *Answer) GetLanguage() string

func (*Answer) GetName

func (m *Answer) GetName() string

func (*Answer) GetOs

func (m *Answer) GetOs() []string

func (*Answer) GetParams

func (m *Answer) GetParams() map[string]string

func (*Answer) GetPath

func (m *Answer) GetPath() string

func (*Answer) GetRemoteOutput

func (m *Answer) GetRemoteOutput() string

func (*Answer) GetScript

func (m *Answer) GetScript() bool

func (*Answer) ProtoMessage

func (*Answer) ProtoMessage()

func (*Answer) Reset

func (m *Answer) Reset()

func (*Answer) String

func (m *Answer) String() string

func (*Answer) XXX_DiscardUnknown

func (m *Answer) XXX_DiscardUnknown()

func (*Answer) XXX_Marshal

func (m *Answer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Answer) XXX_Merge

func (m *Answer) XXX_Merge(src proto.Message)

func (*Answer) XXX_Size

func (m *Answer) XXX_Size() int

func (*Answer) XXX_Unmarshal

func (m *Answer) XXX_Unmarshal(b []byte) error

type EmiroClient

type EmiroClient interface {
	SendQuery(ctx context.Context, in *Query, opts ...grpc.CallOption) (*ResponseQueryAnswer, error)
	SendShow(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Answer, error)
	SendExec(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Answer, error)
	SendNew(ctx context.Context, in *QueryFull, opts ...grpc.CallOption) (*Response, error)
	SendDelete(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Response, error)
	ExecRemote(ctx context.Context, in *Query, opts ...grpc.CallOption) (Emiro_ExecRemoteClient, error)
	SendExecToRemote(ctx context.Context, in *Answer, opts ...grpc.CallOption) (Emiro_SendExecToRemoteClient, error)
}

EmiroClient is the client API for Emiro service.

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

func NewEmiroClient

func NewEmiroClient(cc grpc.ClientConnInterface) EmiroClient

type EmiroServer

type EmiroServer interface {
	SendQuery(context.Context, *Query) (*ResponseQueryAnswer, error)
	SendShow(context.Context, *Query) (*Answer, error)
	SendExec(context.Context, *Query) (*Answer, error)
	SendNew(context.Context, *QueryFull) (*Response, error)
	SendDelete(context.Context, *Query) (*Response, error)
	ExecRemote(*Query, Emiro_ExecRemoteServer) error
	SendExecToRemote(*Answer, Emiro_SendExecToRemoteServer) error
}

EmiroServer is the server API for Emiro service.

type Emiro_ExecRemoteClient

type Emiro_ExecRemoteClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type Emiro_ExecRemoteServer

type Emiro_ExecRemoteServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type Emiro_SendExecToRemoteClient

type Emiro_SendExecToRemoteClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type Emiro_SendExecToRemoteServer

type Emiro_SendExecToRemoteServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type Query

type Query struct {
	Query                string   `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Count                int32    `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	All                  bool     `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"`
	RemoteHost           string   `protobuf:"bytes,4,opt,name=remoteHost,proto3" json:"remoteHost,omitempty"`
	Parameter            []string `protobuf:"bytes,5,rep,name=parameter,proto3" json:"parameter,omitempty"`
	Append               string   `protobuf:"bytes,6,opt,name=append,proto3" json:"append,omitempty"`
	Prepend              string   `protobuf:"bytes,7,opt,name=prepend,proto3" json:"prepend,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Query) Descriptor

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

func (*Query) GetAll

func (m *Query) GetAll() bool

func (*Query) GetAppend

func (m *Query) GetAppend() string

func (*Query) GetCount

func (m *Query) GetCount() int32

func (*Query) GetParameter

func (m *Query) GetParameter() []string

func (*Query) GetPrepend

func (m *Query) GetPrepend() string

func (*Query) GetQuery

func (m *Query) GetQuery() string

func (*Query) GetRemoteHost

func (m *Query) GetRemoteHost() string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type QueryFull

type QueryFull struct {
	Data                 []byte   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QueryFull) Descriptor

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

func (*QueryFull) GetData

func (m *QueryFull) GetData() []byte

func (*QueryFull) ProtoMessage

func (*QueryFull) ProtoMessage()

func (*QueryFull) Reset

func (m *QueryFull) Reset()

func (*QueryFull) String

func (m *QueryFull) String() string

func (*QueryFull) XXX_DiscardUnknown

func (m *QueryFull) XXX_DiscardUnknown()

func (*QueryFull) XXX_Marshal

func (m *QueryFull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryFull) XXX_Merge

func (m *QueryFull) XXX_Merge(src proto.Message)

func (*QueryFull) XXX_Size

func (m *QueryFull) XXX_Size() int

func (*QueryFull) XXX_Unmarshal

func (m *QueryFull) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	Succeed              bool     `protobuf:"varint,1,opt,name=succeed,proto3" json:"succeed,omitempty"`
	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetData

func (m *Response) GetData() []byte

func (*Response) GetSucceed

func (m *Response) GetSucceed() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type ResponseQueryAnswer

type ResponseQueryAnswer struct {
	QueryAnswers         []*Answer `protobuf:"bytes,1,rep,name=queryAnswers,proto3" json:"queryAnswers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ResponseQueryAnswer) Descriptor

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

func (*ResponseQueryAnswer) GetQueryAnswers

func (m *ResponseQueryAnswer) GetQueryAnswers() []*Answer

func (*ResponseQueryAnswer) ProtoMessage

func (*ResponseQueryAnswer) ProtoMessage()

func (*ResponseQueryAnswer) Reset

func (m *ResponseQueryAnswer) Reset()

func (*ResponseQueryAnswer) String

func (m *ResponseQueryAnswer) String() string

func (*ResponseQueryAnswer) XXX_DiscardUnknown

func (m *ResponseQueryAnswer) XXX_DiscardUnknown()

func (*ResponseQueryAnswer) XXX_Marshal

func (m *ResponseQueryAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResponseQueryAnswer) XXX_Merge

func (m *ResponseQueryAnswer) XXX_Merge(src proto.Message)

func (*ResponseQueryAnswer) XXX_Size

func (m *ResponseQueryAnswer) XXX_Size() int

func (*ResponseQueryAnswer) XXX_Unmarshal

func (m *ResponseQueryAnswer) XXX_Unmarshal(b []byte) error

type Server

type Server struct {
}

func (*Server) ExecRemote

func (s *Server) ExecRemote(query *Query, stream Emiro_ExecRemoteServer) error

func (*Server) SendDelete

func (s *Server) SendDelete(ctx context.Context, query *Query) (*Response, error)

func (*Server) SendExec

func (s *Server) SendExec(ctx context.Context, query *Query) (*Answer, error)

func (*Server) SendExecToRemote

func (s *Server) SendExecToRemote(answer *Answer, stream Emiro_SendExecToRemoteServer) error

func (*Server) SendNew

func (s *Server) SendNew(ctx context.Context, query *QueryFull) (*Response, error)

func (*Server) SendQuery

func (s *Server) SendQuery(ctx context.Context, query *Query) (*ResponseQueryAnswer, error)

func (*Server) SendShow

func (s *Server) SendShow(ctx context.Context, query *Query) (*Answer, error)

type UnimplementedEmiroServer

type UnimplementedEmiroServer struct {
}

UnimplementedEmiroServer can be embedded to have forward compatible implementations.

func (*UnimplementedEmiroServer) ExecRemote

func (*UnimplementedEmiroServer) SendDelete

func (*UnimplementedEmiroServer) SendDelete(ctx context.Context, req *Query) (*Response, error)

func (*UnimplementedEmiroServer) SendExec

func (*UnimplementedEmiroServer) SendExec(ctx context.Context, req *Query) (*Answer, error)

func (*UnimplementedEmiroServer) SendExecToRemote

func (*UnimplementedEmiroServer) SendNew

func (*UnimplementedEmiroServer) SendQuery

func (*UnimplementedEmiroServer) SendShow

func (*UnimplementedEmiroServer) SendShow(ctx context.Context, req *Query) (*Answer, error)

Jump to

Keyboard shortcuts

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