pb

package
v0.0.0-...-75f25d5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Predictor_PrepareData_FullMethodName = "/api.Predictor/PrepareData"
	Predictor_Predict_FullMethodName     = "/api.Predictor/Predict"
	Predictor_UniqueCodes_FullMethodName = "/api.Predictor/UniqueCodes"
)
View Source
const (
	Prompter_Extract_FullMethodName       = "/api.Prompter/Extract"
	Prompter_RespondStream_FullMethodName = "/api.Prompter/RespondStream"
)
View Source
const (
	AuthService_Login_FullMethodName = "/api.AuthService/Login"
)

Variables

View Source
var (
	UserRole_name = map[int32]string{
		0: "ROLE_UNDEFINED",
		1: "ROLE_ADMIN",
		2: "ROLE_ANALYST",
		3: "ROLE_BUYER",
	}
	UserRole_value = map[string]int32{
		"ROLE_UNDEFINED": 0,
		"ROLE_ADMIN":     1,
		"ROLE_ANALYST":   2,
		"ROLE_BUYER":     3,
	}
)

Enum value maps for UserRole.

View Source
var (
	QueryType_name = map[int32]string{
		0: "UNDEFINED",
		1: "PREDICTION",
		2: "STOCK",
	}
	QueryType_value = map[string]int32{
		"UNDEFINED":  0,
		"PREDICTION": 1,
		"STOCK":      2,
	}
)

Enum value maps for QueryType.

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/auth.proto",
}

AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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_auth_proto protoreflect.FileDescriptor
View Source
var File_api_predictor_proto protoreflect.FileDescriptor
View Source
var File_api_prompter_proto protoreflect.FileDescriptor
View Source
var Predictor_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.Predictor",
	HandlerType: (*PredictorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PrepareData",
			Handler:    _Predictor_PrepareData_Handler,
		},
		{
			MethodName: "Predict",
			Handler:    _Predictor_Predict_Handler,
		},
		{
			MethodName: "UniqueCodes",
			Handler:    _Predictor_UniqueCodes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/predictor.proto",
}

Predictor_ServiceDesc is the grpc.ServiceDesc for Predictor 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 Prompter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.Prompter",
	HandlerType: (*PrompterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Extract",
			Handler:    _Prompter_Extract_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "RespondStream",
			Handler:       _Prompter_RespondStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/prompter.proto",
}

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

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

func RegisterPredictorServer

func RegisterPredictorServer(s grpc.ServiceRegistrar, srv PredictorServer)

func RegisterPrompterServer

func RegisterPrompterServer(s grpc.ServiceRegistrar, srv PrompterServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
}

AuthServiceClient is the client API for AuthService 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.

type AuthServiceServer

type AuthServiceServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type ExtractReq

type ExtractReq struct {
	Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtractReq) Descriptor deprecated

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

Deprecated: Use ExtractReq.ProtoReflect.Descriptor instead.

func (*ExtractReq) GetPrompt

func (x *ExtractReq) GetPrompt() string

func (*ExtractReq) ProtoMessage

func (*ExtractReq) ProtoMessage()

func (*ExtractReq) ProtoReflect

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

func (*ExtractReq) Reset

func (x *ExtractReq) Reset()

func (*ExtractReq) String

func (x *ExtractReq) String() string

type ExtractedPrompt

type ExtractedPrompt struct {
	Type    QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=api.QueryType" json:"type,omitempty"`
	Product string    `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
	Period  string    `protobuf:"bytes,3,opt,name=period,proto3" json:"period,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtractedPrompt) Descriptor deprecated

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

Deprecated: Use ExtractedPrompt.ProtoReflect.Descriptor instead.

func (*ExtractedPrompt) GetPeriod

func (x *ExtractedPrompt) GetPeriod() string

func (*ExtractedPrompt) GetProduct

func (x *ExtractedPrompt) GetProduct() string

func (*ExtractedPrompt) GetType

func (x *ExtractedPrompt) GetType() QueryType

func (*ExtractedPrompt) ProtoMessage

func (*ExtractedPrompt) ProtoMessage()

func (*ExtractedPrompt) ProtoReflect

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

func (*ExtractedPrompt) Reset

func (x *ExtractedPrompt) Reset()

func (*ExtractedPrompt) String

func (x *ExtractedPrompt) String() string

type LoginRequest

type LoginRequest 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 (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Token string     `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Roles []UserRole `protobuf:"varint,2,rep,packed,name=roles,proto3,enum=api.UserRole" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetRoles

func (x *LoginResponse) GetRoles() []UserRole

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type PredictReq

type PredictReq struct {
	Type         QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=api.QueryType" json:"type,omitempty"`
	Product      string    `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
	Period       string    `protobuf:"bytes,3,opt,name=period,proto3" json:"period,omitempty"`
	Organization string    `protobuf:"bytes,4,opt,name=organization,proto3" json:"organization,omitempty"`
	// contains filtered or unexported fields
}

func (*PredictReq) Descriptor deprecated

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

Deprecated: Use PredictReq.ProtoReflect.Descriptor instead.

func (*PredictReq) GetOrganization

func (x *PredictReq) GetOrganization() string

func (*PredictReq) GetPeriod

func (x *PredictReq) GetPeriod() string

func (*PredictReq) GetProduct

func (x *PredictReq) GetProduct() string

func (*PredictReq) GetType

func (x *PredictReq) GetType() QueryType

func (*PredictReq) ProtoMessage

func (*PredictReq) ProtoMessage()

func (*PredictReq) ProtoReflect

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

func (*PredictReq) Reset

func (x *PredictReq) Reset()

func (*PredictReq) String

func (x *PredictReq) String() string

type PredictResp

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

func (*PredictResp) Descriptor deprecated

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

Deprecated: Use PredictResp.ProtoReflect.Descriptor instead.

func (*PredictResp) GetData

func (x *PredictResp) GetData() []byte

func (*PredictResp) ProtoMessage

func (*PredictResp) ProtoMessage()

func (*PredictResp) ProtoReflect

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

func (*PredictResp) Reset

func (x *PredictResp) Reset()

func (*PredictResp) String

func (x *PredictResp) String() string

type PredictorClient

type PredictorClient interface {
	PrepareData(ctx context.Context, in *PrepareDataReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Predict(ctx context.Context, in *PredictReq, opts ...grpc.CallOption) (*PredictResp, error)
	UniqueCodes(ctx context.Context, in *UniqueCodesReq, opts ...grpc.CallOption) (*UniqueCodesResp, error)
}

PredictorClient is the client API for Predictor 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 NewPredictorClient

func NewPredictorClient(cc grpc.ClientConnInterface) PredictorClient

type PredictorServer

type PredictorServer interface {
	PrepareData(context.Context, *PrepareDataReq) (*emptypb.Empty, error)
	Predict(context.Context, *PredictReq) (*PredictResp, error)
	UniqueCodes(context.Context, *UniqueCodesReq) (*UniqueCodesResp, error)
	// contains filtered or unexported methods
}

PredictorServer is the server API for Predictor service. All implementations must embed UnimplementedPredictorServer for forward compatibility

type PrepareDataReq

type PrepareDataReq struct {
	Sources      []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"`
	Organization string    `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"`
	// contains filtered or unexported fields
}

func (*PrepareDataReq) Descriptor deprecated

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

Deprecated: Use PrepareDataReq.ProtoReflect.Descriptor instead.

func (*PrepareDataReq) GetOrganization

func (x *PrepareDataReq) GetOrganization() string

func (*PrepareDataReq) GetSources

func (x *PrepareDataReq) GetSources() []*Source

func (*PrepareDataReq) ProtoMessage

func (*PrepareDataReq) ProtoMessage()

func (*PrepareDataReq) ProtoReflect

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

func (*PrepareDataReq) Reset

func (x *PrepareDataReq) Reset()

func (*PrepareDataReq) String

func (x *PrepareDataReq) String() string

type PrompterClient

type PrompterClient interface {
	Extract(ctx context.Context, in *ExtractReq, opts ...grpc.CallOption) (*ExtractedPrompt, error)
	RespondStream(ctx context.Context, in *StreamReq, opts ...grpc.CallOption) (Prompter_RespondStreamClient, error)
}

PrompterClient is the client API for Prompter 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 NewPrompterClient

func NewPrompterClient(cc grpc.ClientConnInterface) PrompterClient

type PrompterServer

type PrompterServer interface {
	Extract(context.Context, *ExtractReq) (*ExtractedPrompt, error)
	RespondStream(*StreamReq, Prompter_RespondStreamServer) error
	// contains filtered or unexported methods
}

PrompterServer is the server API for Prompter service. All implementations must embed UnimplementedPrompterServer for forward compatibility

type Prompter_RespondStreamClient

type Prompter_RespondStreamClient interface {
	Recv() (*StreamResp, error)
	grpc.ClientStream
}

type Prompter_RespondStreamServer

type Prompter_RespondStreamServer interface {
	Send(*StreamResp) error
	grpc.ServerStream
}

type QueryType

type QueryType int32
const (
	QueryType_UNDEFINED  QueryType = 0
	QueryType_PREDICTION QueryType = 1
	QueryType_STOCK      QueryType = 2
)

func (QueryType) Descriptor

func (QueryType) Descriptor() protoreflect.EnumDescriptor

func (QueryType) Enum

func (x QueryType) Enum() *QueryType

func (QueryType) EnumDescriptor deprecated

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

Deprecated: Use QueryType.Descriptor instead.

func (QueryType) Number

func (x QueryType) Number() protoreflect.EnumNumber

func (QueryType) String

func (x QueryType) String() string

func (QueryType) Type

type Source

type Source struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*Source) Descriptor deprecated

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

Deprecated: Use Source.ProtoReflect.Descriptor instead.

func (*Source) GetName

func (x *Source) GetName() string

func (*Source) GetPath

func (x *Source) GetPath() string

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) ProtoReflect

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

func (*Source) Reset

func (x *Source) Reset()

func (*Source) String

func (x *Source) String() string

type StreamReq

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

func (*StreamReq) Descriptor deprecated

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

Deprecated: Use StreamReq.ProtoReflect.Descriptor instead.

func (*StreamReq) GetPrompt

func (x *StreamReq) GetPrompt() []byte

func (*StreamReq) ProtoMessage

func (*StreamReq) ProtoMessage()

func (*StreamReq) ProtoReflect

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

func (*StreamReq) Reset

func (x *StreamReq) Reset()

func (*StreamReq) String

func (x *StreamReq) String() string

type StreamResp

type StreamResp struct {
	Chunk string `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResp) Descriptor deprecated

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

Deprecated: Use StreamResp.ProtoReflect.Descriptor instead.

func (*StreamResp) GetChunk

func (x *StreamResp) GetChunk() string

func (*StreamResp) ProtoMessage

func (*StreamResp) ProtoMessage()

func (*StreamResp) ProtoReflect

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

func (*StreamResp) Reset

func (x *StreamResp) Reset()

func (*StreamResp) String

func (x *StreamResp) String() string

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) Login

type UnimplementedPredictorServer

type UnimplementedPredictorServer struct {
}

UnimplementedPredictorServer must be embedded to have forward compatible implementations.

func (UnimplementedPredictorServer) Predict

func (UnimplementedPredictorServer) PrepareData

func (UnimplementedPredictorServer) UniqueCodes

type UnimplementedPrompterServer

type UnimplementedPrompterServer struct {
}

UnimplementedPrompterServer must be embedded to have forward compatible implementations.

func (UnimplementedPrompterServer) Extract

func (UnimplementedPrompterServer) RespondStream

type UniqueCode

type UniqueCode struct {
	Segment string `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Regular bool   `protobuf:"varint,3,opt,name=regular,proto3" json:"regular,omitempty"`
	// contains filtered or unexported fields
}

func (*UniqueCode) Descriptor deprecated

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

Deprecated: Use UniqueCode.ProtoReflect.Descriptor instead.

func (*UniqueCode) GetName

func (x *UniqueCode) GetName() string

func (*UniqueCode) GetRegular

func (x *UniqueCode) GetRegular() bool

func (*UniqueCode) GetSegment

func (x *UniqueCode) GetSegment() string

func (*UniqueCode) ProtoMessage

func (*UniqueCode) ProtoMessage()

func (*UniqueCode) ProtoReflect

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

func (*UniqueCode) Reset

func (x *UniqueCode) Reset()

func (*UniqueCode) String

func (x *UniqueCode) String() string

type UniqueCodesReq

type UniqueCodesReq struct {
	Organization string `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
	// contains filtered or unexported fields
}

func (*UniqueCodesReq) Descriptor deprecated

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

Deprecated: Use UniqueCodesReq.ProtoReflect.Descriptor instead.

func (*UniqueCodesReq) GetOrganization

func (x *UniqueCodesReq) GetOrganization() string

func (*UniqueCodesReq) ProtoMessage

func (*UniqueCodesReq) ProtoMessage()

func (*UniqueCodesReq) ProtoReflect

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

func (*UniqueCodesReq) Reset

func (x *UniqueCodesReq) Reset()

func (*UniqueCodesReq) String

func (x *UniqueCodesReq) String() string

type UniqueCodesResp

type UniqueCodesResp struct {
	Codes []*UniqueCode `protobuf:"bytes,1,rep,name=codes,proto3" json:"codes,omitempty"`
	// contains filtered or unexported fields
}

func (*UniqueCodesResp) Descriptor deprecated

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

Deprecated: Use UniqueCodesResp.ProtoReflect.Descriptor instead.

func (*UniqueCodesResp) GetCodes

func (x *UniqueCodesResp) GetCodes() []*UniqueCode

func (*UniqueCodesResp) ProtoMessage

func (*UniqueCodesResp) ProtoMessage()

func (*UniqueCodesResp) ProtoReflect

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

func (*UniqueCodesResp) Reset

func (x *UniqueCodesResp) Reset()

func (*UniqueCodesResp) String

func (x *UniqueCodesResp) String() string

type UnsafeAuthServiceServer

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

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

type UnsafePredictorServer

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

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

type UnsafePrompterServer

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

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

type UserRole

type UserRole int32
const (
	UserRole_ROLE_UNDEFINED UserRole = 0
	UserRole_ROLE_ADMIN     UserRole = 1
	UserRole_ROLE_ANALYST   UserRole = 2
	UserRole_ROLE_BUYER     UserRole = 3
)

func (UserRole) Descriptor

func (UserRole) Descriptor() protoreflect.EnumDescriptor

func (UserRole) Enum

func (x UserRole) Enum() *UserRole

func (UserRole) EnumDescriptor deprecated

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

Deprecated: Use UserRole.Descriptor instead.

func (UserRole) Number

func (x UserRole) Number() protoreflect.EnumNumber

func (UserRole) String

func (x UserRole) String() string

func (UserRole) Type

Jump to

Keyboard shortcuts

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