ScalarDescriptor describes an scalar type to be used with the scalar field option and declared by declare_scalar. Scalars extend simple protobuf built-in types with additional syntax and semantics, for instance to represent big integers. Scalars should ideally define an encoding such that there is only one valid syntactical representation for a given semantic meaning, i.e. the encoding should be deterministic.

from message cosmos_proto.ScalarDescriptor

Hierarchy

Constructors

Properties

description: string = ""

description is a human-readable description of the scalar and its encoding format. For instance a big integer or decimal scalar should specify precisely the expected encoding format.

from field: string description = 2;

fieldType: ScalarType[] = []

field_type is the type of field with which this scalar can be used. Scalars can be used with one and only one type of field so that encoding standards and simple and clear. Currently only string and bytes fields are supported for scalars.

from field: repeated cosmos_proto.ScalarType field_type = 3;

name: string = ""

name is the name of the scalar. It should be a short-name (without a period) such that the fully qualified name of the scalar will be package.name, ex. for the package a.b and scalar named C, the fully-qualified name will be a.b.C.

from field: string name = 1;

fields: FieldList = ...
runtime: ProtoRuntime = proto3
typeName: "cosmos_proto.ScalarDescriptor" = "cosmos_proto.ScalarDescriptor"

Methods