v1

package
v0.0.0-...-2ccd497 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableColumn_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_BOOL",
		2: "TYPE_DATE_TIME",
		3: "TYPE_INT64",
		4: "TYPE_REAL",
		5: "TYPE_STRING",
		6: "TYPE_TIMESPAN",
	}
	TableColumn_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_BOOL":        1,
		"TYPE_DATE_TIME":   2,
		"TYPE_INT64":       3,
		"TYPE_REAL":        4,
		"TYPE_STRING":      5,
		"TYPE_TIMESPAN":    6,
	}
)

Enum value maps for TableColumn_Type.

View Source
var (
	TableSchema_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_RAW",
		2: "TYPE_PARSED",
	}
	TableSchema_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_RAW":         1,
		"TYPE_PARSED":      2,
	}
)

Enum value maps for TableSchema_Type.

View Source
var APIService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.APIService",
	HandlerType: (*APIServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListSessions",
			Handler:    _APIService_ListSessions_Handler,
		},
		{
			MethodName: "UpdateSession",
			Handler:    _APIService_UpdateSession_Handler,
		},
		{
			MethodName: "CreateParsedTable",
			Handler:    _APIService_CreateParsedTable_Handler,
		},
		{
			MethodName: "QueryTable",
			Handler:    _APIService_QueryTable_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/service.proto",
}

APIService_ServiceDesc is the grpc.ServiceDesc for APIService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_v1_model_proto protoreflect.FileDescriptor
View Source
var File_api_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterAPIServiceServer

func RegisterAPIServiceServer(s grpc.ServiceRegistrar, srv APIServiceServer)

Types

type APIServiceClient

type APIServiceClient interface {
	ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
	UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*UpdateSessionResponse, error)
	CreateParsedTable(ctx context.Context, in *CreateParsedTableRequest, opts ...grpc.CallOption) (*CreateParsedTableResponse, error)
	QueryTable(ctx context.Context, in *QueryTableRequest, opts ...grpc.CallOption) (*QueryTableResponse, error)
}

APIServiceClient is the client API for APIService 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 NewAPIServiceClient

func NewAPIServiceClient(cc grpc.ClientConnInterface) APIServiceClient

type APIServiceServer

type APIServiceServer interface {
	ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
	UpdateSession(context.Context, *UpdateSessionRequest) (*UpdateSessionResponse, error)
	CreateParsedTable(context.Context, *CreateParsedTableRequest) (*CreateParsedTableResponse, error)
	QueryTable(context.Context, *QueryTableRequest) (*QueryTableResponse, error)
	// contains filtered or unexported methods
}

APIServiceServer is the server API for APIService service. All implementations must embed UnimplementedAPIServiceServer for forward compatibility

type CreateParsedTableRequest

type CreateParsedTableRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	TableName string `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
	Sql       string `protobuf:"bytes,3,opt,name=sql,proto3" json:"sql,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateParsedTableRequest) Descriptor deprecated

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

Deprecated: Use CreateParsedTableRequest.ProtoReflect.Descriptor instead.

func (*CreateParsedTableRequest) GetSessionId

func (x *CreateParsedTableRequest) GetSessionId() string

func (*CreateParsedTableRequest) GetSql

func (x *CreateParsedTableRequest) GetSql() string

func (*CreateParsedTableRequest) GetTableName

func (x *CreateParsedTableRequest) GetTableName() string

func (*CreateParsedTableRequest) ProtoMessage

func (*CreateParsedTableRequest) ProtoMessage()

func (*CreateParsedTableRequest) ProtoReflect

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

func (*CreateParsedTableRequest) Reset

func (x *CreateParsedTableRequest) Reset()

func (*CreateParsedTableRequest) String

func (x *CreateParsedTableRequest) String() string

type CreateParsedTableResponse

type CreateParsedTableResponse struct {
	Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateParsedTableResponse) Descriptor deprecated

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

Deprecated: Use CreateParsedTableResponse.ProtoReflect.Descriptor instead.

func (*CreateParsedTableResponse) GetSession

func (x *CreateParsedTableResponse) GetSession() *Session

func (*CreateParsedTableResponse) ProtoMessage

func (*CreateParsedTableResponse) ProtoMessage()

func (*CreateParsedTableResponse) ProtoReflect

func (*CreateParsedTableResponse) Reset

func (x *CreateParsedTableResponse) Reset()

func (*CreateParsedTableResponse) String

func (x *CreateParsedTableResponse) String() string

type ListSessionsRequest

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

func (*ListSessionsRequest) Descriptor deprecated

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

Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.

func (*ListSessionsRequest) ProtoMessage

func (*ListSessionsRequest) ProtoMessage()

func (*ListSessionsRequest) ProtoReflect

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

func (*ListSessionsRequest) Reset

func (x *ListSessionsRequest) Reset()

func (*ListSessionsRequest) String

func (x *ListSessionsRequest) String() string

type ListSessionsResponse

type ListSessionsResponse struct {
	Sessions []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSessionsResponse) Descriptor deprecated

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

Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.

func (*ListSessionsResponse) GetSessions

func (x *ListSessionsResponse) GetSessions() []*Session

func (*ListSessionsResponse) ProtoMessage

func (*ListSessionsResponse) ProtoMessage()

func (*ListSessionsResponse) ProtoReflect

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

func (*ListSessionsResponse) Reset

func (x *ListSessionsResponse) Reset()

func (*ListSessionsResponse) String

func (x *ListSessionsResponse) String() string

type QueryTableRequest

type QueryTableRequest struct {

	// sql specifies the sql query to run
	Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryTableRequest) Descriptor deprecated

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

Deprecated: Use QueryTableRequest.ProtoReflect.Descriptor instead.

func (*QueryTableRequest) GetSql

func (x *QueryTableRequest) GetSql() string

func (*QueryTableRequest) ProtoMessage

func (*QueryTableRequest) ProtoMessage()

func (*QueryTableRequest) ProtoReflect

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

func (*QueryTableRequest) Reset

func (x *QueryTableRequest) Reset()

func (*QueryTableRequest) String

func (x *QueryTableRequest) String() string

type QueryTableResponse

type QueryTableResponse struct {
	Rows    []*TableRow    `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	Columns []*TableColumn `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryTableResponse) Descriptor deprecated

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

Deprecated: Use QueryTableResponse.ProtoReflect.Descriptor instead.

func (*QueryTableResponse) GetColumns

func (x *QueryTableResponse) GetColumns() []*TableColumn

func (*QueryTableResponse) GetRows

func (x *QueryTableResponse) GetRows() []*TableRow

func (*QueryTableResponse) ProtoMessage

func (*QueryTableResponse) ProtoMessage()

func (*QueryTableResponse) ProtoReflect

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

func (*QueryTableResponse) Reset

func (x *QueryTableResponse) Reset()

func (*QueryTableResponse) String

func (x *QueryTableResponse) String() string

type Session

type Session struct {

	// id - id of the session (immutable).
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// tables - tables in the session.
	Tables []*TableSchema `protobuf:"bytes,2,rep,name=tables,proto3" json:"tables,omitempty"`
	// name - display name of the session.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetId

func (x *Session) GetId() string

func (*Session) GetName

func (x *Session) GetName() string

func (*Session) GetTables

func (x *Session) GetTables() []*TableSchema

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type TableColumn

type TableColumn struct {

	// key - key of the table column.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// type - type of the table column.
	Type TableColumn_Type `protobuf:"varint,2,opt,name=type,proto3,enum=api.v1.TableColumn_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*TableColumn) Descriptor deprecated

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

Deprecated: Use TableColumn.ProtoReflect.Descriptor instead.

func (*TableColumn) GetKey

func (x *TableColumn) GetKey() string

func (*TableColumn) GetType

func (x *TableColumn) GetType() TableColumn_Type

func (*TableColumn) ProtoMessage

func (*TableColumn) ProtoMessage()

func (*TableColumn) ProtoReflect

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

func (*TableColumn) Reset

func (x *TableColumn) Reset()

func (*TableColumn) String

func (x *TableColumn) String() string

type TableColumn_Type

type TableColumn_Type int32
const (
	TableColumn_TYPE_UNSPECIFIED TableColumn_Type = 0
	TableColumn_TYPE_BOOL        TableColumn_Type = 1
	TableColumn_TYPE_DATE_TIME   TableColumn_Type = 2
	TableColumn_TYPE_INT64       TableColumn_Type = 3
	TableColumn_TYPE_REAL        TableColumn_Type = 4
	TableColumn_TYPE_STRING      TableColumn_Type = 5
	TableColumn_TYPE_TIMESPAN    TableColumn_Type = 6
)

func (TableColumn_Type) Descriptor

func (TableColumn_Type) Enum

func (TableColumn_Type) EnumDescriptor deprecated

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

Deprecated: Use TableColumn_Type.Descriptor instead.

func (TableColumn_Type) Number

func (TableColumn_Type) String

func (x TableColumn_Type) String() string

func (TableColumn_Type) Type

type TableKeyValue

type TableKeyValue struct {

	// key - key of the table column.
	Key           string                  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	ValueBool     *wrapperspb.BoolValue   `protobuf:"bytes,3,opt,name=value_bool,json=valueBool,proto3" json:"value_bool,omitempty"`
	ValueDateTime *timestamppb.Timestamp  `protobuf:"bytes,4,opt,name=value_date_time,json=valueDateTime,proto3" json:"value_date_time,omitempty"`
	ValueInt64    *wrapperspb.Int64Value  `protobuf:"bytes,5,opt,name=value_int64,json=valueInt64,proto3" json:"value_int64,omitempty"`
	ValueReal     *wrapperspb.DoubleValue `protobuf:"bytes,6,opt,name=value_real,json=valueReal,proto3" json:"value_real,omitempty"`
	ValueString   *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=value_string,json=valueString,proto3" json:"value_string,omitempty"`
	ValueDuration *durationpb.Duration    `protobuf:"bytes,8,opt,name=value_duration,json=valueDuration,proto3" json:"value_duration,omitempty"`
	// contains filtered or unexported fields
}

func (*TableKeyValue) Descriptor deprecated

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

Deprecated: Use TableKeyValue.ProtoReflect.Descriptor instead.

func (*TableKeyValue) GetKey

func (x *TableKeyValue) GetKey() string

func (*TableKeyValue) GetValueBool

func (x *TableKeyValue) GetValueBool() *wrapperspb.BoolValue

func (*TableKeyValue) GetValueDateTime

func (x *TableKeyValue) GetValueDateTime() *timestamppb.Timestamp

func (*TableKeyValue) GetValueDuration

func (x *TableKeyValue) GetValueDuration() *durationpb.Duration

func (*TableKeyValue) GetValueInt64

func (x *TableKeyValue) GetValueInt64() *wrapperspb.Int64Value

func (*TableKeyValue) GetValueReal

func (x *TableKeyValue) GetValueReal() *wrapperspb.DoubleValue

func (*TableKeyValue) GetValueString

func (x *TableKeyValue) GetValueString() *wrapperspb.StringValue

func (*TableKeyValue) ProtoMessage

func (*TableKeyValue) ProtoMessage()

func (*TableKeyValue) ProtoReflect

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

func (*TableKeyValue) Reset

func (x *TableKeyValue) Reset()

func (*TableKeyValue) String

func (x *TableKeyValue) String() string

type TableRow

type TableRow struct {
	Columns []*TableKeyValue `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	// contains filtered or unexported fields
}

func (*TableRow) Descriptor deprecated

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

Deprecated: Use TableRow.ProtoReflect.Descriptor instead.

func (*TableRow) GetColumns

func (x *TableRow) GetColumns() []*TableKeyValue

func (*TableRow) ProtoMessage

func (*TableRow) ProtoMessage()

func (*TableRow) ProtoReflect

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

func (*TableRow) Reset

func (x *TableRow) Reset()

func (*TableRow) String

func (x *TableRow) String() string

type TableSchema

type TableSchema struct {

	// id - id of the table (immutable).
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// type - type of the table.
	Type TableSchema_Type `protobuf:"varint,2,opt,name=type,proto3,enum=api.v1.TableSchema_Type" json:"type,omitempty"`
	// columns - columns of the table.
	Columns []*TableColumn `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	// session_id - the session id of the table.
	SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// name - display name of the table.
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*TableSchema) Descriptor deprecated

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

Deprecated: Use TableSchema.ProtoReflect.Descriptor instead.

func (*TableSchema) GetColumns

func (x *TableSchema) GetColumns() []*TableColumn

func (*TableSchema) GetId

func (x *TableSchema) GetId() string

func (*TableSchema) GetName

func (x *TableSchema) GetName() string

func (*TableSchema) GetSessionId

func (x *TableSchema) GetSessionId() string

func (*TableSchema) GetType

func (x *TableSchema) GetType() TableSchema_Type

func (*TableSchema) ProtoMessage

func (*TableSchema) ProtoMessage()

func (*TableSchema) ProtoReflect

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

func (*TableSchema) Reset

func (x *TableSchema) Reset()

func (*TableSchema) String

func (x *TableSchema) String() string

type TableSchema_Type

type TableSchema_Type int32
const (
	TableSchema_TYPE_UNSPECIFIED TableSchema_Type = 0
	TableSchema_TYPE_RAW         TableSchema_Type = 1
	TableSchema_TYPE_PARSED      TableSchema_Type = 2
)

func (TableSchema_Type) Descriptor

func (TableSchema_Type) Enum

func (TableSchema_Type) EnumDescriptor deprecated

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

Deprecated: Use TableSchema_Type.Descriptor instead.

func (TableSchema_Type) Number

func (TableSchema_Type) String

func (x TableSchema_Type) String() string

func (TableSchema_Type) Type

type UnimplementedAPIServiceServer

type UnimplementedAPIServiceServer struct {
}

UnimplementedAPIServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIServiceServer) CreateParsedTable

func (UnimplementedAPIServiceServer) ListSessions

func (UnimplementedAPIServiceServer) QueryTable

func (UnimplementedAPIServiceServer) UpdateSession

type UnsafeAPIServiceServer

type UnsafeAPIServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAPIServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServiceServer will result in compilation errors.

type UpdateSessionRequest

type UpdateSessionRequest struct {
	Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSessionRequest) Descriptor deprecated

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

Deprecated: Use UpdateSessionRequest.ProtoReflect.Descriptor instead.

func (*UpdateSessionRequest) GetSession

func (x *UpdateSessionRequest) GetSession() *Session

func (*UpdateSessionRequest) ProtoMessage

func (*UpdateSessionRequest) ProtoMessage()

func (*UpdateSessionRequest) ProtoReflect

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

func (*UpdateSessionRequest) Reset

func (x *UpdateSessionRequest) Reset()

func (*UpdateSessionRequest) String

func (x *UpdateSessionRequest) String() string

type UpdateSessionResponse

type UpdateSessionResponse struct {
	Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSessionResponse) Descriptor deprecated

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

Deprecated: Use UpdateSessionResponse.ProtoReflect.Descriptor instead.

func (*UpdateSessionResponse) GetSession

func (x *UpdateSessionResponse) GetSession() *Session

func (*UpdateSessionResponse) ProtoMessage

func (*UpdateSessionResponse) ProtoMessage()

func (*UpdateSessionResponse) ProtoReflect

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

func (*UpdateSessionResponse) Reset

func (x *UpdateSessionResponse) Reset()

func (*UpdateSessionResponse) String

func (x *UpdateSessionResponse) String() string

Jump to

Keyboard shortcuts

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