package ocaml-protoc-plugin

  1. Overview
  2. Docs

Describes a method of a service.

type t = {
  1. name : string option;
  2. input_type : string option;
    (*

    Input and output type names. These are resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type.

    *)
  3. output_type : string option;
  4. options : MethodOptions.t option;
  5. client_streaming : bool;
    (*

    Identifies if client streams multiple client messages

    *)
  6. server_streaming : bool;
    (*

    Identifies if server streams multiple server messages

    *)
}
val make : ?name:string -> ?input_type:string -> ?output_type:string -> ?options:MethodOptions.t -> ?client_streaming:bool -> ?server_streaming:bool -> unit -> t

Helper function to generate a message using default values

Serialize the message to binary format

val from_proto : Ocaml_protoc_plugin.Reader.t -> (t, [> Ocaml_protoc_plugin.Result.error ]) Stdlib.result

Deserialize from binary format

Serialize to Json (compatible with Yojson.Basic.t)

val from_json : Ocaml_protoc_plugin.Json.t -> (t, [> Ocaml_protoc_plugin.Result.error ]) Stdlib.result

Deserialize from Json (compatible with Yojson.Basic.t)

val name : unit -> string

Fully qualified protobuf name of this message

OCaml

Innovation. Community. Security.