web

package
v0.0.0-...-f73e227 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WriteType_name = map[int32]string{
		0: "CSV",
		1: "MONGO",
	}
	WriteType_value = map[string]int32{
		"CSV":   0,
		"MONGO": 1,
	}
)

Enum value maps for WriteType.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Auth.ProtoReflect.Descriptor instead.

func (*Auth) GetAuth

func (m *Auth) GetAuth() isAuth_Auth

func (*Auth) GetBasic

func (x *Auth) GetBasic() *BasicAuth

func (*Auth) GetCoinbase

func (x *Auth) GetCoinbase() *CoinbaseAuth

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) ProtoReflect

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

func (*Auth) Reset

func (x *Auth) Reset()

func (*Auth) String

func (x *Auth) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use BasicAuth.ProtoReflect.Descriptor instead.

func (*BasicAuth) GetPassword

func (x *BasicAuth) GetPassword() string

func (*BasicAuth) GetUsername

func (x *BasicAuth) GetUsername() string

func (*BasicAuth) ProtoMessage

func (*BasicAuth) ProtoMessage()

func (*BasicAuth) ProtoReflect

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

func (*BasicAuth) Reset

func (x *BasicAuth) Reset()

func (*BasicAuth) String

func (x *BasicAuth) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use CSVConfig.ProtoReflect.Descriptor instead.

func (*CSVConfig) GetFile

func (x *CSVConfig) GetFile() string

func (*CSVConfig) ProtoMessage

func (*CSVConfig) ProtoMessage()

func (*CSVConfig) ProtoReflect

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

func (*CSVConfig) Reset

func (x *CSVConfig) Reset()

func (*CSVConfig) String

func (x *CSVConfig) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAuth

func (x *Request) GetAuth() *Auth

func (*Request) GetRequests

func (x *Request) GetRequests() []*WriteRequest

func (*Request) GetWriters

func (x *Request) GetWriters() []*Writer

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedWebServer

type UnimplementedWebServer struct {
}

UnimplementedWebServer must be embedded to have forward compatible implementations.

func (UnimplementedWebServer) Write

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
const (
	// CSV writes the response as a CSV file.
	WriteType_CSV WriteType = 0
	// MongoDB writes the response to a MongoDB database.
	WriteType_MONGO WriteType = 1
)

func (WriteType) Descriptor

func (WriteType) Descriptor() protoreflect.EnumDescriptor

func (WriteType) Enum

func (x WriteType) Enum() *WriteType

func (WriteType) EnumDescriptor deprecated

func (WriteType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WriteType.Descriptor instead.

func (WriteType) Number

func (x WriteType) Number() protoreflect.EnumNumber

func (WriteType) String

func (x WriteType) String() string

func (WriteType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Writer.ProtoReflect.Descriptor instead.

func (*Writer) GetConnString

func (x *Writer) GetConnString() string

func (*Writer) GetDatabase

func (x *Writer) GetDatabase() string

func (*Writer) GetDir

func (x *Writer) GetDir() string

func (*Writer) GetType

func (x *Writer) GetType() WriteType

func (*Writer) ProtoMessage

func (*Writer) ProtoMessage()

func (*Writer) ProtoReflect

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

func (*Writer) Reset

func (x *Writer) Reset()

func (*Writer) String

func (x *Writer) String() string

Jump to

Keyboard shortcuts

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