Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only generate toProtoSomeType function #4002

Open
normalllll opened this issue Apr 4, 2024 · 0 comments
Open

Only generate toProtoSomeType function #4002

normalllll opened this issue Apr 4, 2024 · 0 comments

Comments

@normalllll
Copy link

I need to implement a custom RPC service instead of the CRUD generated by entpb by default, so I only need to generate the proto file and ent.SomeType to protobuf struct,

How can we generate func toProtoSomeType(event.SomeTime) (*Some Type, error) without generating the default CRUD Service?

tried this

func (ModelMixin) Annotations() []schema.Annotation {
	return []schema.Annotation{
		entproto.Message(),
		entproto.Service(entproto.Methods(entproto.Method(1))),
	}
}

But entgo still generates an empty gRPC Service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant