Categorygithub.com/lesomnus/proto-orm
modulepackage
0.0.0-20250207073152-c4dc540befff
Repository: https://github.com/lesomnus/proto-orm.git
Documentation: pkg.go.dev

# README

proto-orm

ORM support for protobuf.

Designed with inspiration from Ent, it supports gRPC auto-generation based on Ent. I look forward to supporting more backends beyond Ent.

Peek

syntax = "proto3";

import "orm.proto";
import "google/protobuf/timestamp.proto";

message User {
	bytes id = 1 [
		(orm.field) = {
			type: TYPE_UUID
			key: true
			default: ""
		}
	];
	repeated Pet pets = 2;

	message Profile {
		message Name {
			string first = 1;
			string last = 2;
		}
		Name name = 1;
		uint32 age = 2;
		string email = 3;
	}
	Profile profile = 3 [
		(orm.field) = {
			type: TYPE_JSON
		}
	];

	google.protobuf.Timestamp date_created = 15 [
		(orm.field) = {
			immutable: true
			default: ""
		}
	];
}

message Pet {
	bytes id = 1 [
		(orm.field) = {
			type: TYPE_UUID
			key: true
			default: ""
		}
	];
	User owner = 2 [
		(orm.edge) = {
			from: 2 // pets
		}
	];
}

Limitations

  • Does not support composite key.
  • Only opaque API is supported for Go generated code.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
int decay.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
unsigned int decay.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

optional orm.FileOptions all = 45000;.
optional orm.EdgeOptions edge = 45004;.
optional orm.FieldOptions field = 45003;.
optional orm.MessageOptions message = 45001;.
optional orm.RpcOptions rpcs = 45002;.
No description provided by the author
Enum value maps for Type.
Enum value maps for Type.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author