jsonmapent

package module
v0.0.0-...-8fb0596 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

jsonmap-ent

Ent field helper for github.com/ubgo/jsonmap.

Install

go get github.com/ubgo/jsonmap-ent

Use

import (
    "entgo.io/ent"

    jsonmapent "github.com/ubgo/jsonmap-ent"
)

type Event struct{ ent.Schema }

func (Event) Fields() []ent.Field {
    return []ent.Field{
        jsonmapent.Field("metadata"),
    }
}

For finer control compose field.JSON("metadata", jsonmap.JsonMap{}).Optional()... directly.

License

Apache-2.0 — see LICENSE.

Documentation

Overview

Package jsonmapent provides an ent.Field constructor for github.com/ubgo/jsonmap.JsonMap columns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Field

func Field(name string) ent.Field

Field returns an ent.Field for a jsonmap.JsonMap column. The column is stored as JSON / JSONB at the SQL layer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL