Documentation
¶
Index ¶
- type Provider
- func (p *Provider) ContentType() string
- func (p *Provider) Endpoint() string
- func (p *Provider) Generate(ctx context.Context, app farp.Application) (any, error)
- func (p *Provider) GenerateDescriptor(ctx context.Context, app farp.Application, locationType farp.LocationType, ...) (*farp.SchemaDescriptor, error)
- func (p *Provider) GetSchemaFiles() []string
- func (p *Provider) Hash(schema any) (string, error)
- func (p *Provider) Serialize(schema any) ([]byte, error)
- func (p *Provider) SetEndpoint(endpoint string)
- func (p *Provider) SetSchemaFiles(files []string)
- func (p *Provider) SpecVersion() string
- func (p *Provider) Type() farp.SchemaType
- func (p *Provider) Validate(schema any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider generates Apache Avro schemas from applications.
func NewProvider ¶
NewProvider creates a new Avro schema provider specVersion should be the Avro specification version (e.g., "1.11.1").
func (*Provider) ContentType ¶
ContentType returns the content type.
func (*Provider) GenerateDescriptor ¶
func (p *Provider) GenerateDescriptor(ctx context.Context, app farp.Application, locationType farp.LocationType, locationConfig map[string]string) (*farp.SchemaDescriptor, error)
GenerateDescriptor generates a complete SchemaDescriptor for this schema.
func (*Provider) GetSchemaFiles ¶
GetSchemaFiles returns the configured schema files.
func (*Provider) SetEndpoint ¶
SetEndpoint sets the HTTP endpoint for the Avro schema.
func (*Provider) SetSchemaFiles ¶
SetSchemaFiles sets the .avsc schema files to parse.
func (*Provider) SpecVersion ¶
SpecVersion returns the Avro specification version.
Click to show internal directories.
Click to hide internal directories.