lauber00/elm-protocol-buffers/1.1.4

NOTE: the latest version is 1.1.9

Renamed to volgariver6/elm-protocol-buffers. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as lauber00/elm-protocol-buffers still install under that name. 11 versions of 11 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/volgariver6/elm-protocol-buffers.

What we checked: The repo moved to github.com/volgariver6/elm-protocol-buffers. Rebuilt with git archive from commit 51c12f5ef0da of https://github.com/volgariver6/elm-protocol-buffers (zip prefix lauber00-elm-protocol-buffers-2ca1238/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 dffa4d8221a9cc7adb4ff1be5aa0e656769dcb7b.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/lauber00/elm-protocol-buffers/zipball/1.1.4/

Google.Protobuf

This module contains the Well-Known Types of Protocol Buffers. For the official and complete documentation, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf.

Models

Any

type alias Any =
{ typeUrl : String
, value : Bytes
}

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Api

type alias Api =
{ name : String
, methods : List Method
, options : List Option
, version : String
, sourceContext : Maybe SourceContext
, mixins : List Mixin
, syntax : Syntax
}

Api is a light-weight descriptor for an API Interface.

type alias Method =
{ name : String
, requestTypeUrl : String
, requestStreaming : Bool
, responseTypeUrl : String
, responseStreaming : Bool
, options : List Option
, syntax : Syntax
}

Method represents a method of an API interface.

type alias Mixin =
{ name : String
, root : String
}

Declares an API Interface to be included in this interface.

Duration

type alias Duration =
{ seconds : Int
, nanos : Int
}

A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp.

Warning: Range is only +/-68 years instead of the specified +/-10,000 as 64 bit integers are currently not supported.

Empty

type alias Empty =
{}

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method.

FieldMask

type alias FieldMask =
{ paths : List String }

FieldMask represents a set of symbolic field paths.

SourceContext

type alias SourceContext =
{ fileName : String }

SourceContext represents information about the source of a protobuf element, like the file in which it is defined.

Struct

type alias Struct =
{ fields : StructFields }

Struct represents a structured data value, consisting of fields which map to dynamically typed values.

= StructFields (Dict String (Maybe Value))

Wrapper type to work with recursive aliases.

type alias Value =
{ kind : ValueKind }

Value represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error.

= ValueKind (Maybe KindType)

Wrapper type to work with recursive aliases.

= KindNullValue NullValue
| KindNumberValue Float
| KindStringValue String
| KindBoolValue Bool
| KindStructValue Struct
| KindListValue ListValue

The kind of value.

= NullValue
| NullValueUnrecognized_ Int

NullValue is a singleton enumeration to represent the null value for the Value type union.

type alias ListValue =
{ values : ListValueValues }

ListValue is a wrapper around a repeated field of values.

= ListValueValues (List Value)

Wrapper type to work with recursive aliases.

Timestamp

type alias Timestamp =
{ seconds : Int
, nanos : Int
}

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a 24-hour linear smear.

Warning: Range is only from 1901-12-13T20:45:52Z to 2038-01-19T03:14:07Z instead of the specified 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z as 64 bit integers are currently not supported.

Type

type alias Type =
{ name : String
, fields : List Field
, oneofs : List String
, options : List Option
, sourceContext : Maybe SourceContext
, syntax : Syntax
}

A protocol buffer message type.

type alias Field =
{ kind : Kind
, cardinality : Cardinality
, number : Int
, name : String
, typeUrl : String
, oneofIndex : Int
, packed : Bool
, options : List Option
, jsonName : String
, defaultValue : String
}

A single field of a message type.

type Kind
= TypeUnknown
| TypeDouble
| TypeFloat
| TypeInt64
| TypeUint64
| TypeInt32
| TypeFixed64
| TypeFixed32
| TypeBool
| TypeString
| TypeGroup
| TypeMessage
| TypeBytes
| TypeUint32
| TypeEnum
| TypeSfixed32
| TypeSfixed64
| TypeSint32
| TypeSint64
| KindUnrecognized_ Int

Basic field types.

= CardinalityUnknown
| CardinalityOptional
| CardinalityRequired
| CardinalityRepeated
| CardinalityUnrecognized_ Int

Whether a field is optional, required, or repeated.

type alias Enum =
{ name : String
, enumvalue : List EnumValue
, options : List Option
, sourceContext : Maybe SourceContext
, syntax : Syntax
}

Enum type definition.

type alias EnumValue =
{ name : String
, number : Int
, options : List Option
}

Enum value definition.

type alias Option =
{ name : String
, value : Maybe Any
}

A protocol buffer option, which can be attached to a message, field, enumeration, etc.

type Syntax
= SyntaxProto2
| SyntaxProto3
| SyntaxUnrecognized_ Int

The syntax in which a protocol buffer element is defined.

Wrappers

Int64Value and UInt64Value are not provided here as explained in the known limitations.

type alias DoubleValue =
{ value : Float }

Wrapper message for double.

type alias FloatValue =
{ value : Float }

Wrapper message for float.

type alias Int32Value =
{ value : Int }

Wrapper message for int32.

type alias UInt32Value =
{ value : Int }

Wrapper message for uint32.

type alias BoolValue =
{ value : Bool }

Wrapper message for bool.

type alias StringValue =
{ value : String }

Wrapper message for string.

type alias BytesValue =
{ value : Bytes }

Wrapper message for bytes.

Decoders

The package exposes decoders for all top-level well-known types.

Encoders

The package exposes encoders for all top-level well-known types.

toSourceContextEncoder : SourceContext -> Encoder
toDoubleValueEncoder : DoubleValue -> Encoder
toUInt32ValueEncoder : UInt32Value -> Encoder
toStringValueEncoder : StringValue -> Encoder