Documentation
¶
Index ¶
- Variables
- func RegisterWebServer(s grpc.ServiceRegistrar, srv WebServer)
- type Auth
- func (*Auth) Descriptor() ([]byte, []int)deprecated
- func (m *Auth) GetAuth() isAuth_Auth
- func (x *Auth) GetBasic() *BasicAuth
- func (x *Auth) GetCoinbase() *CoinbaseAuth
- func (*Auth) ProtoMessage()
- func (x *Auth) ProtoReflect() protoreflect.Message
- func (x *Auth) Reset()
- func (x *Auth) String() string
- type Auth_Basic
- type Auth_Coinbase
- type BasicAuth
- type CSVConfig
- type CoinbaseAuth
- func (*CoinbaseAuth) Descriptor() ([]byte, []int)deprecated
- func (x *CoinbaseAuth) GetKey() string
- func (x *CoinbaseAuth) GetPassphrase() string
- func (x *CoinbaseAuth) GetSecret() string
- func (*CoinbaseAuth) ProtoMessage()
- func (x *CoinbaseAuth) ProtoReflect() protoreflect.Message
- func (x *CoinbaseAuth) Reset()
- func (x *CoinbaseAuth) String() string
- type MongoConfig
- func (*MongoConfig) Descriptor() ([]byte, []int)deprecated
- func (x *MongoConfig) GetCollection() string
- func (x *MongoConfig) GetIndex() []string
- func (*MongoConfig) ProtoMessage()
- func (x *MongoConfig) ProtoReflect() protoreflect.Message
- func (x *MongoConfig) Reset()
- func (x *MongoConfig) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetAuth() *Auth
- func (x *Request) GetRequests() []*WriteRequest
- func (x *Request) GetWriters() []*Writer
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type UnimplementedWebServer
- type UnsafeWebServer
- type WebClient
- type WebServer
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteRequest) GetAuth() *Auth
- func (x *WriteRequest) GetCsv() *CSVConfig
- func (x *WriteRequest) GetMethod() string
- func (x *WriteRequest) GetMongo() *MongoConfig
- func (x *WriteRequest) GetQueryParams() map[string]string
- func (x *WriteRequest) GetUrl() string
- func (x *WriteRequest) GetWriters() []*Writer
- func (*WriteRequest) ProtoMessage()
- func (x *WriteRequest) ProtoReflect() protoreflect.Message
- func (x *WriteRequest) Reset()
- func (x *WriteRequest) String() string
- type WriteType
- type Writer
- func (*Writer) Descriptor() ([]byte, []int)deprecated
- func (x *Writer) GetConnString() string
- func (x *Writer) GetDatabase() string
- func (x *Writer) GetDir() string
- func (x *Writer) GetType() WriteType
- func (*Writer) ProtoMessage()
- func (x *Writer) ProtoReflect() protoreflect.Message
- func (x *Writer) Reset()
- func (x *Writer) String() string
Constants ¶
This section is empty.
Variables ¶
var ( WriteType_name = map[int32]string{ 0: "CSV", 1: "MONGO", } WriteType_value = map[string]int32{ "CSV": 0, "MONGO": 1, } )
Enum value maps for WriteType.
var File_web_proto protoreflect.FileDescriptor
var Web_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Web", HandlerType: (*WebServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Write", Handler: _Web_Write_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "web.proto", }
Web_ServiceDesc is the grpc.ServiceDesc for Web service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWebServer ¶
func RegisterWebServer(s grpc.ServiceRegistrar, srv WebServer)
Types ¶
type Auth ¶
type Auth struct { // Types that are assignable to Auth: // // *Auth_Basic // *Auth_Coinbase Auth isAuth_Auth `protobuf_oneof:"auth"` // contains filtered or unexported fields }
func (*Auth) Descriptor
deprecated
func (*Auth) GetCoinbase ¶
func (x *Auth) GetCoinbase() *CoinbaseAuth
func (*Auth) ProtoMessage ¶
func (*Auth) ProtoMessage()
func (*Auth) ProtoReflect ¶
func (x *Auth) ProtoReflect() protoreflect.Message
type Auth_Basic ¶
type Auth_Basic struct {
Basic *BasicAuth `protobuf:"bytes,1,opt,name=basic,proto3,oneof"`
}
type Auth_Coinbase ¶
type Auth_Coinbase struct {
Coinbase *CoinbaseAuth `protobuf:"bytes,2,opt,name=coinbase,proto3,oneof"`
}
type BasicAuth ¶
type BasicAuth struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*BasicAuth) Descriptor
deprecated
func (*BasicAuth) GetPassword ¶
func (*BasicAuth) GetUsername ¶
func (*BasicAuth) ProtoMessage ¶
func (*BasicAuth) ProtoMessage()
func (*BasicAuth) ProtoReflect ¶
func (x *BasicAuth) ProtoReflect() protoreflect.Message
type CSVConfig ¶
type CSVConfig struct { File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // contains filtered or unexported fields }
func (*CSVConfig) Descriptor
deprecated
func (*CSVConfig) ProtoMessage ¶
func (*CSVConfig) ProtoMessage()
func (*CSVConfig) ProtoReflect ¶
func (x *CSVConfig) ProtoReflect() protoreflect.Message
type CoinbaseAuth ¶
type CoinbaseAuth struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` Passphrase string `protobuf:"bytes,3,opt,name=passphrase,proto3" json:"passphrase,omitempty"` // contains filtered or unexported fields }
func (*CoinbaseAuth) Descriptor
deprecated
func (*CoinbaseAuth) Descriptor() ([]byte, []int)
Deprecated: Use CoinbaseAuth.ProtoReflect.Descriptor instead.
func (*CoinbaseAuth) GetKey ¶
func (x *CoinbaseAuth) GetKey() string
func (*CoinbaseAuth) GetPassphrase ¶
func (x *CoinbaseAuth) GetPassphrase() string
func (*CoinbaseAuth) GetSecret ¶
func (x *CoinbaseAuth) GetSecret() string
func (*CoinbaseAuth) ProtoMessage ¶
func (*CoinbaseAuth) ProtoMessage()
func (*CoinbaseAuth) ProtoReflect ¶
func (x *CoinbaseAuth) ProtoReflect() protoreflect.Message
func (*CoinbaseAuth) Reset ¶
func (x *CoinbaseAuth) Reset()
func (*CoinbaseAuth) String ¶
func (x *CoinbaseAuth) String() string
type MongoConfig ¶
type MongoConfig struct { Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` Index []string `protobuf:"bytes,2,rep,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
func (*MongoConfig) Descriptor
deprecated
func (*MongoConfig) Descriptor() ([]byte, []int)
Deprecated: Use MongoConfig.ProtoReflect.Descriptor instead.
func (*MongoConfig) GetCollection ¶
func (x *MongoConfig) GetCollection() string
func (*MongoConfig) GetIndex ¶
func (x *MongoConfig) GetIndex() []string
func (*MongoConfig) ProtoMessage ¶
func (*MongoConfig) ProtoMessage()
func (*MongoConfig) ProtoReflect ¶
func (x *MongoConfig) ProtoReflect() protoreflect.Message
func (*MongoConfig) Reset ¶
func (x *MongoConfig) Reset()
func (*MongoConfig) String ¶
func (x *MongoConfig) String() string
type Request ¶
type Request struct { Requests []*WriteRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` // Writers are the writers to use for the transporting the response // to local storage. This is the default for all write requests and // can be overridden on a per-write request basis. Writers []*Writer `protobuf:"bytes,2,rep,name=writers,proto3" json:"writers,omitempty"` // Auth is the global auth for all requests, it can be overridden by the // individual requests. Auth *Auth `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetRequests ¶
func (x *Request) GetRequests() []*WriteRequest
func (*Request) GetWriters ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedWebServer ¶
type UnimplementedWebServer struct { }
UnimplementedWebServer must be embedded to have forward compatible implementations.
type UnsafeWebServer ¶
type UnsafeWebServer interface {
// contains filtered or unexported methods
}
UnsafeWebServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebServer will result in compilation errors.
type WebClient ¶
type WebClient interface {
Write(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
WebClient is the client API for Web service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewWebClient ¶
func NewWebClient(cc grpc.ClientConnInterface) WebClient
type WebServer ¶
type WebServer interface { Write(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
WebServer is the server API for Web service. All implementations must embed UnimplementedWebServer for forward compatibility
type WriteRequest ¶
type WriteRequest struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // QueryParams are the query parameters to use for the HTTP request. QueryParams map[string]string `` /* 182-byte string literal not displayed */ // Writers are the writers to use for the transporting the response // to local storage. Writers []*Writer `protobuf:"bytes,4,rep,name=writers,proto3" json:"writers,omitempty"` // Auth is the request-specific auth, if blank the default global auth // defined on the web.Request will be used. Auth *Auth `protobuf:"bytes,5,opt,name=auth,proto3" json:"auth,omitempty"` // CSV is the CSV configuration for the request. Csv *CSVConfig `protobuf:"bytes,6,opt,name=csv,proto3" json:"csv,omitempty"` // Mongo is the MongoDB configuration for the request. Mongo *MongoConfig `protobuf:"bytes,7,opt,name=mongo,proto3" json:"mongo,omitempty"` // contains filtered or unexported fields }
func (*WriteRequest) Descriptor
deprecated
func (*WriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) GetAuth ¶
func (x *WriteRequest) GetAuth() *Auth
func (*WriteRequest) GetCsv ¶
func (x *WriteRequest) GetCsv() *CSVConfig
func (*WriteRequest) GetMethod ¶
func (x *WriteRequest) GetMethod() string
func (*WriteRequest) GetMongo ¶
func (x *WriteRequest) GetMongo() *MongoConfig
func (*WriteRequest) GetQueryParams ¶
func (x *WriteRequest) GetQueryParams() map[string]string
func (*WriteRequest) GetUrl ¶
func (x *WriteRequest) GetUrl() string
func (*WriteRequest) GetWriters ¶
func (x *WriteRequest) GetWriters() []*Writer
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) ProtoReflect ¶
func (x *WriteRequest) ProtoReflect() protoreflect.Message
func (*WriteRequest) Reset ¶
func (x *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (x *WriteRequest) String() string
type WriteType ¶
type WriteType int32
func (WriteType) Descriptor ¶
func (WriteType) Descriptor() protoreflect.EnumDescriptor
func (WriteType) EnumDescriptor
deprecated
func (WriteType) Number ¶
func (x WriteType) Number() protoreflect.EnumNumber
func (WriteType) Type ¶
func (WriteType) Type() protoreflect.EnumType
type Writer ¶
type Writer struct { Type WriteType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.WriteType" json:"type,omitempty"` Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty"` Database string `protobuf:"bytes,3,opt,name=database,proto3" json:"database,omitempty"` ConnString string `protobuf:"bytes,4,opt,name=conn_string,json=connString,proto3" json:"conn_string,omitempty"` // contains filtered or unexported fields }
func (*Writer) Descriptor
deprecated
func (*Writer) GetConnString ¶
func (*Writer) GetDatabase ¶
func (*Writer) ProtoMessage ¶
func (*Writer) ProtoMessage()
func (*Writer) ProtoReflect ¶
func (x *Writer) ProtoReflect() protoreflect.Message