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

Casttypewith #659

Closed
wants to merge 3 commits into from
Closed

Casttypewith #659

wants to merge 3 commits into from

Conversation

trasc
Copy link

@trasc trasc commented Jan 14, 2020

Add a new extension "casttypewith" that could be used to define and use fields
of an non-local type, by using a custom caster type.

The caster should implement:
func (c *Caster) Equal(a, b *Castee) bool
func (c *Caster) Size(a *Castee) int
func (c *Caster) MarshalTo(a *Castee, buf []byte) (int, error)
func (c *Caster) Unmarshal(buf []byte) (*Castee, error)
func (c *Caster) NewPopulated() *Castee

The protobuf field type should be "bytes"
The feature is usable only with marshal and unmarshal plugins
and features like JSONPB and text marshaling is are incompatible.

@trasc trasc requested a review from jmarais January 16, 2020 13:40
trasc added 3 commits January 31, 2020 22:35
Add a new extension "casttypewith" that could be used to define field
of an non-local type, by using a custom caster type.

The caster should implement:
func (c *Caster) Equal(a, b *Castee) bool
func (c *Caster) Size(a *Castee) int
func (c *Caster) MarshalTo(a *Castee, buf []byte) (int, error)
func (c *Caster) Unmarshal(buf []byte) (*Castee, error)
func (c *Caster) NewPopulated() *Castee

The protobuf field type should be "bytes"
The feature is usable only with marshal and unmarshal plugins
and features like JSONPB and text marshaling is are incompatible.
@trasc trasc requested review from awalterschulze and removed request for jmarais February 10, 2020 06:38
@trasc trasc mentioned this pull request Mar 30, 2020
@trasc trasc closed this Mar 16, 2023
@trasc trasc deleted the casttypewith branch March 16, 2023 16:17
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

Successfully merging this pull request may close these issues.

1 participant