Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Langs.Protobuf.Proto3
Description
A model for Protocol Buffers v3 enum and message types, designed as a target for transformations.This model is loosely based on https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/type.proto, as well as the proto3 reference documentation
Synopsis
- data Definition
- _Definition :: Name
- _Definition_enum :: Name
- _Definition_message :: Name
- data EnumDefinition = EnumDefinition {}
- _EnumDefinition :: Name
- _EnumDefinition_name :: Name
- _EnumDefinition_values :: Name
- _EnumDefinition_options :: Name
- data EnumValue = EnumValue {}
- _EnumValue :: Name
- _EnumValue_name :: Name
- _EnumValue_number :: Name
- _EnumValue_options :: Name
- newtype EnumValueName = EnumValueName {}
- _EnumValueName :: Name
- data Field = Field {
- fieldName :: FieldName
- fieldJsonName :: Maybe String
- fieldType :: FieldType
- fieldNumber :: Int
- fieldOptions :: [Option]
- _Field :: Name
- _Field_name :: Name
- _Field_jsonName :: Name
- _Field_type :: Name
- _Field_number :: Name
- _Field_options :: Name
- newtype FieldName = FieldName {}
- _FieldName :: Name
- data FieldType
- _FieldType :: Name
- _FieldType_map :: Name
- _FieldType_oneof :: Name
- _FieldType_repeated :: Name
- _FieldType_simple :: Name
- newtype FileReference = FileReference {}
- _FileReference :: Name
- data MessageDefinition = MessageDefinition {}
- _MessageDefinition :: Name
- _MessageDefinition_name :: Name
- _MessageDefinition_fields :: Name
- _MessageDefinition_options :: Name
- data Option = Option {
- optionName :: String
- optionValue :: Value
- _Option :: Name
- _Option_name :: Name
- _Option_value :: Name
- newtype PackageName = PackageName {}
- _PackageName :: Name
- data ProtoFile = ProtoFile {}
- _ProtoFile :: Name
- _ProtoFile_package :: Name
- _ProtoFile_imports :: Name
- _ProtoFile_types :: Name
- _ProtoFile_options :: Name
- data ScalarType
- _ScalarType :: Name
- _ScalarType_bool :: Name
- _ScalarType_bytes :: Name
- _ScalarType_double :: Name
- _ScalarType_fixed32 :: Name
- _ScalarType_fixed64 :: Name
- _ScalarType_float :: Name
- _ScalarType_int32 :: Name
- _ScalarType_int64 :: Name
- _ScalarType_sfixed32 :: Name
- _ScalarType_sfixed64 :: Name
- _ScalarType_sint32 :: Name
- _ScalarType_sint64 :: Name
- _ScalarType_string :: Name
- _ScalarType_uint32 :: Name
- _ScalarType_uint64 :: Name
- data SimpleType
- _SimpleType :: Name
- _SimpleType_reference :: Name
- _SimpleType_scalar :: Name
- newtype TypeName = TypeName {
- unTypeName :: String
- _TypeName :: Name
- newtype TypeReference = TypeReference {}
- _TypeReference :: Name
- data Value
- _Value :: Name
- _Value_boolean :: Name
- _Value_string :: Name
Documentation
data Definition Source #
Instances
Read Definition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS Definition # readList :: ReadS [Definition] # readPrec :: ReadPrec Definition # readListPrec :: ReadPrec [Definition] # | |
Show Definition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> Definition -> ShowS # show :: Definition -> String # showList :: [Definition] -> ShowS # | |
Eq Definition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 | |
Ord Definition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: Definition -> Definition -> Ordering # (<) :: Definition -> Definition -> Bool # (<=) :: Definition -> Definition -> Bool # (>) :: Definition -> Definition -> Bool # (>=) :: Definition -> Definition -> Bool # max :: Definition -> Definition -> Definition # min :: Definition -> Definition -> Definition # |
_Definition :: Name Source #
data EnumDefinition Source #
Enum type definition
Constructors
EnumDefinition | |
Fields
|
Instances
Read EnumDefinition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS EnumDefinition # readList :: ReadS [EnumDefinition] # | |
Show EnumDefinition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> EnumDefinition -> ShowS # show :: EnumDefinition -> String # showList :: [EnumDefinition] -> ShowS # | |
Eq EnumDefinition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods (==) :: EnumDefinition -> EnumDefinition -> Bool # (/=) :: EnumDefinition -> EnumDefinition -> Bool # | |
Ord EnumDefinition Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: EnumDefinition -> EnumDefinition -> Ordering # (<) :: EnumDefinition -> EnumDefinition -> Bool # (<=) :: EnumDefinition -> EnumDefinition -> Bool # (>) :: EnumDefinition -> EnumDefinition -> Bool # (>=) :: EnumDefinition -> EnumDefinition -> Bool # max :: EnumDefinition -> EnumDefinition -> EnumDefinition # min :: EnumDefinition -> EnumDefinition -> EnumDefinition # |
Enum value definition
Constructors
EnumValue | |
Fields
|
Instances
Read EnumValue Source # | |
Show EnumValue Source # | |
Eq EnumValue Source # | |
Ord EnumValue Source # | |
_EnumValue :: Name Source #
newtype EnumValueName Source #
Constructors
EnumValueName | |
Fields |
Instances
Read EnumValueName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS EnumValueName # readList :: ReadS [EnumValueName] # | |
Show EnumValueName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> EnumValueName -> ShowS # show :: EnumValueName -> String # showList :: [EnumValueName] -> ShowS # | |
Eq EnumValueName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods (==) :: EnumValueName -> EnumValueName -> Bool # (/=) :: EnumValueName -> EnumValueName -> Bool # | |
Ord EnumValueName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: EnumValueName -> EnumValueName -> Ordering # (<) :: EnumValueName -> EnumValueName -> Bool # (<=) :: EnumValueName -> EnumValueName -> Bool # (>) :: EnumValueName -> EnumValueName -> Bool # (>=) :: EnumValueName -> EnumValueName -> Bool # max :: EnumValueName -> EnumValueName -> EnumValueName # min :: EnumValueName -> EnumValueName -> EnumValueName # |
A single field of a message type
Constructors
Field | |
Fields
|
_Field_name :: Name Source #
_Field_type :: Name Source #
_Field_number :: Name Source #
The name of a field
Constructors
FieldName | |
Fields |
Instances
Read FieldName Source # | |
Show FieldName Source # | |
Eq FieldName Source # | |
Ord FieldName Source # | |
_FieldName :: Name Source #
Constructors
FieldTypeMap SimpleType | |
FieldTypeOneof [Field] | |
FieldTypeRepeated SimpleType | |
FieldTypeSimple SimpleType |
Instances
Read FieldType Source # | |
Show FieldType Source # | |
Eq FieldType Source # | |
Ord FieldType Source # | |
_FieldType :: Name Source #
newtype FileReference Source #
Constructors
FileReference | |
Fields |
Instances
Read FileReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS FileReference # readList :: ReadS [FileReference] # | |
Show FileReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> FileReference -> ShowS # show :: FileReference -> String # showList :: [FileReference] -> ShowS # | |
Eq FileReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods (==) :: FileReference -> FileReference -> Bool # (/=) :: FileReference -> FileReference -> Bool # | |
Ord FileReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: FileReference -> FileReference -> Ordering # (<) :: FileReference -> FileReference -> Bool # (<=) :: FileReference -> FileReference -> Bool # (>) :: FileReference -> FileReference -> Bool # (>=) :: FileReference -> FileReference -> Bool # max :: FileReference -> FileReference -> FileReference # min :: FileReference -> FileReference -> FileReference # |
data MessageDefinition Source #
A protocol buffer message type
Constructors
MessageDefinition | |
Fields
|
Instances
A protocol buffer option, which can be attached to a message, field, enumeration, etc
Constructors
Option | |
Fields
|
_Option_name :: Name Source #
_Option_value :: Name Source #
newtype PackageName Source #
Constructors
PackageName | |
Fields |
Instances
Read PackageName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS PackageName # readList :: ReadS [PackageName] # readPrec :: ReadPrec PackageName # readListPrec :: ReadPrec [PackageName] # | |
Show PackageName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> PackageName -> ShowS # show :: PackageName -> String # showList :: [PackageName] -> ShowS # | |
Eq PackageName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 | |
Ord PackageName Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: PackageName -> PackageName -> Ordering # (<) :: PackageName -> PackageName -> Bool # (<=) :: PackageName -> PackageName -> Bool # (>) :: PackageName -> PackageName -> Bool # (>=) :: PackageName -> PackageName -> Bool # max :: PackageName -> PackageName -> PackageName # min :: PackageName -> PackageName -> PackageName # |
_PackageName :: Name Source #
A .proto file, usually containing one or more enum or message type definitions
Constructors
ProtoFile | |
Fields |
Instances
Read ProtoFile Source # | |
Show ProtoFile Source # | |
Eq ProtoFile Source # | |
Ord ProtoFile Source # | |
_ProtoFile :: Name Source #
data ScalarType Source #
One of several Proto3 scalar types
Constructors
Instances
Read ScalarType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS ScalarType # readList :: ReadS [ScalarType] # readPrec :: ReadPrec ScalarType # readListPrec :: ReadPrec [ScalarType] # | |
Show ScalarType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> ScalarType -> ShowS # show :: ScalarType -> String # showList :: [ScalarType] -> ShowS # | |
Eq ScalarType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 | |
Ord ScalarType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: ScalarType -> ScalarType -> Ordering # (<) :: ScalarType -> ScalarType -> Bool # (<=) :: ScalarType -> ScalarType -> Bool # (>) :: ScalarType -> ScalarType -> Bool # (>=) :: ScalarType -> ScalarType -> Bool # max :: ScalarType -> ScalarType -> ScalarType # min :: ScalarType -> ScalarType -> ScalarType # |
_ScalarType :: Name Source #
data SimpleType Source #
A scalar type or a reference to an enum type or message type
Constructors
SimpleTypeReference TypeName | |
SimpleTypeScalar ScalarType |
Instances
Read SimpleType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS SimpleType # readList :: ReadS [SimpleType] # readPrec :: ReadPrec SimpleType # readListPrec :: ReadPrec [SimpleType] # | |
Show SimpleType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> SimpleType -> ShowS # show :: SimpleType -> String # showList :: [SimpleType] -> ShowS # | |
Eq SimpleType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 | |
Ord SimpleType Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: SimpleType -> SimpleType -> Ordering # (<) :: SimpleType -> SimpleType -> Bool # (<=) :: SimpleType -> SimpleType -> Bool # (>) :: SimpleType -> SimpleType -> Bool # (>=) :: SimpleType -> SimpleType -> Bool # max :: SimpleType -> SimpleType -> SimpleType # min :: SimpleType -> SimpleType -> SimpleType # |
_SimpleType :: Name Source #
The local name of an enum type or message type
Constructors
TypeName | |
Fields
|
newtype TypeReference Source #
A reference to an enum type or message type
Constructors
TypeReference | |
Fields |
Instances
Read TypeReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods readsPrec :: Int -> ReadS TypeReference # readList :: ReadS [TypeReference] # | |
Show TypeReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods showsPrec :: Int -> TypeReference -> ShowS # show :: TypeReference -> String # showList :: [TypeReference] -> ShowS # | |
Eq TypeReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods (==) :: TypeReference -> TypeReference -> Bool # (/=) :: TypeReference -> TypeReference -> Bool # | |
Ord TypeReference Source # | |
Defined in Hydra.Langs.Protobuf.Proto3 Methods compare :: TypeReference -> TypeReference -> Ordering # (<) :: TypeReference -> TypeReference -> Bool # (<=) :: TypeReference -> TypeReference -> Bool # (>) :: TypeReference -> TypeReference -> Bool # (>=) :: TypeReference -> TypeReference -> Bool # max :: TypeReference -> TypeReference -> TypeReference # min :: TypeReference -> TypeReference -> TypeReference # |
A scalar value
Constructors
ValueBoolean Bool | |
ValueString String |
_Value_string :: Name Source #