MockStreamService contains mock methods for testing bi-di streams.
Method Name | Request Type | Response Type | Description |
Stream | .google.protobuf.Any stream | .google.protobuf.Any stream | Stream streams any messages bi-directionally. |
DummyStream | .google.protobuf.Empty stream | .google.protobuf.Empty stream | DummyStream streams emtpy messages bi-directionally |
MockStreamUnaryService contains mock methods for testing stream requests with unary
responses
Method Name | Request Type | Response Type | Description |
StreamUnary | .google.protobuf.Any stream | .google.protobuf.Any | StreamUnary streams Any messages as a request and receives a single Any response. |
DummyStreamUnary | .google.protobuf.Empty stream | .google.protobuf.Empty | DummyStreamUnary streams emtpy request messages and receives a single Empty response. |
Mock is a service for testing interceptors or other generic service utilities.
Method Name | Request Type | Response Type | Description |
Unary | .google.protobuf.Any | .google.protobuf.Any | Unary takes in an Any request and returns an Any message. |
Dummy | .google.protobuf.Empty | .google.protobuf.Empty | Dummy sends an empty request and gets an empty response. |
MockStreamService contains mock methods for testing unary request with stream
responses.
Method Name | Request Type | Response Type | Description |
UnaryStream | .google.protobuf.Any | .google.protobuf.Any stream | UnaryStream send a unary Any request and receives an Any response stream. |
DummyUnaryStream | .google.protobuf.Empty | .google.protobuf.Empty stream | DummyStream streams emtpy messages bi-directionally |
Error holds information about an error.
Field | Type | Label | Description |
id | cereal.UUID | id is a uuid that uniquely identifies this error. |
|
issuer | string | issuer is the issuer of a code. If multiple services use this library, they can differentiate their error codes by having unique issuers. If a number of services working together in the same backend coordinate to ensure their error definitions do not overlap, they can share an Issuer value. |
|
code | uint32 | code is the API Error code. |
|
grpc_code | int32 | grpc_code is the grpc status code associated with this error. |
|
name | string | name is the human-readable API Error name tied to code. |
|
message | string | message is the error message. |
|
source_error | string | source_err is a string representation of the original native error that lead to this gRPEAKEC Error. Can be blank. |
|
source_type | string | source_type is the type of source_err. Can be blank. |
|
time | google.protobuf.Timestamp | time is the time that the error occurred |
|
details | google.protobuf.Any | repeated | details are arbitrary information about the error. |
trace | TraceInfo | repeated | Trace holds a stack of TraceInfo objects. Each time an app encounters an error, it can add it's TraceInfo object to the end of the trace. |
Trace info holds information about where an error occurred.
Field | Type | Label | Description |
app_name | string | app name is the name of the service or process that generated the error. |
|
app_host | string | Identifier for the host the app is running on. |
|
stack_trace | string | stack_trace of the error (can be ""). No enforced format. This is meant for human reference). |
|
additional_context | string | Some languages let an error continue to gather context, with wrapping errors in go. This field can be used to store additional context added to the error after it was created. |
Pupil is the wizard-to-be for sorting.
Field | Type | Label | Description |
name | string |
|
Sorted returns the House the pupil has been placed into.
Field | Type | Label | Description |
house | House |
|
House is the house a Wizard is getting sorted into.
Name | Number | Description |
Gryffindor | 0 | |
Hufflepuff | 1 | |
Ravenclaw | 2 | |
Slytherin | 3 |
SortingHat sorts pupils into houses
Method Name | Request Type | Response Type | Description |
Sort | Pupil | Sorted | Sort sorts the pupil into a house. |
Ping is a service that can be run alongside your own service as an easy way to
test that a service's server is up and running and taking requests.
Method Name | Request Type | Response Type | Description |
Ping | .google.protobuf.Empty | .google.protobuf.Empty | Ping is a simple endpoint to test if a service is running. |
Wrapper type for UUID to make type-based marshalling and unmarshalling easier
Field | Type | Label | Description |
value | bytes | Raw uuid bytes go here. |
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
double | double | double | float | float64 | double | float | Float | |
float | float | float | float | float32 | float | float | Float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |