Kazan v0.4.0 Kazan.Models View Source

Contains generated structs for all Kube models as defined in the OAI specs.

Each namespace underneath Kazan.Models represents a single struct as used by the Kubernetes API.

Also contains functions for serializing & deserializing these generated structs.

Link to this section Summary

Functions

Decodes data from a Map into a Model struct

Encodes data from a Kazan model to plain Maps suitable for JSON encoding

Takes the name of a model in the OpenAPI spec, and returns the module that implements that model

Link to this section Functions

Link to this function decode(data, kind \\ nil) View Source
decode(Map.t, atom | nil) :: {:ok, struct} | {:err, term}

Decodes data from a Map into a Model struct.

Link to this function encode(model) View Source
encode(struct) :: {:ok, Map.t} | {:err, term}

Encodes data from a Kazan model to plain Maps suitable for JSON encoding.

Link to this function oai_name_to_module(oai_name) View Source
oai_name_to_module(String.t) :: atom | nil

Takes the name of a model in the OpenAPI spec, and returns the module that implements that model.