Documentation ¶
Overview ¶
Package schemaregistry provides a client for Confluent's Kafka Schema Registry REST API. https://github.com/Landoop/schema-registry/tree/0.1.0
Index ¶
- Constants
- Variables
- func DeleteNestedMap(pathParts []string, data map[string]interface{}) bool
- func FlattenFact(dataArray []interface{}, pathKey string, pathValue string) map[string]interface{}
- func GetBeginningOfDay(t time.Time) string
- func GetBeginningOfMonth(t time.Time) string
- func GetBeginningOfYear(t time.Time) string
- func GetDailyRange(t time.Time) []string
- func GetEndOfDay(t time.Time) string
- func GetEndOfMonth(t time.Time) string
- func GetEndOfYear(t time.Time) string
- func GetTime(t time.Time) string
- func GetTimeZone(t time.Time) string
- func LookupNestedMap(pathParts []string, data map[string]interface{}) (interface{}, bool)
- func NewUUIDFromBits(uuidMostSig int64, uuidLeastSig int64) string
- func PatchNestedMap(pathParts []string, data map[string]interface{}, newValue interface{}) bool
- type CachedSchemaRegistry
- type Client
- type Schema
- type ZapLeveledLogger
- func (logger ZapLeveledLogger) Debug(msg string, keysAndValues ...interface{})
- func (logger ZapLeveledLogger) Error(msg string, keysAndValues ...interface{})
- func (logger ZapLeveledLogger) Info(msg string, keysAndValues ...interface{})
- func (logger ZapLeveledLogger) Warn(msg string, keysAndValues ...interface{})
Constants ¶
const TimeLayout = "2006-01-02T15:04:05.000"
TimeLayout is the myrtea default time layout
Variables ¶
var DefaultURL = "http://localhost:8081"
DefaultURL is the address where a local schema registry listens by default.
Functions ¶
func DeleteNestedMap ¶
DeleteNestedMap delete a specific path value in a map
func FlattenFact ¶
func GetBeginningOfDay ¶
GetBeginningOfDay return input time with time 00:00:00 formated to elasticsearch standard format
func GetBeginningOfMonth ¶
GetBeginningOfMonth beginning of month
func GetBeginningOfYear ¶
GetBeginningOfYear beginning of year
func GetDailyRange ¶
GetDailyRange returns a range of time for the current day (from 00:00:00 to now) with 1 value per hour
func GetEndOfDay ¶
GetEndOfDay return input time with time 00:00:00 formated to elasticsearch standard format
func GetTimeZone ¶
GetTimeZone return timezone of the input time
func LookupNestedMap ¶
LookupNestedMap lookup for a value corresponding to the exact specified path inside a map
func NewUUIDFromBits ¶ added in v4.1.3
New return a formatted UUID based on two int64
func PatchNestedMap ¶
PatchNestedMap update a specific path value in a map
Types ¶
type CachedSchemaRegistry ¶ added in v4.1.3
type CachedSchemaRegistry struct {
// contains filtered or unexported fields
}
CachedSchemaRegistry :
func NewCachedSchemaRegistry ¶ added in v4.1.3
func NewCachedSchemaRegistry(url string, ttlCacheDuration time.Duration) (*CachedSchemaRegistry, error)
NewCachedSchemaRegistry :
func (CachedSchemaRegistry) GetSchemaByID ¶ added in v4.1.3
func (reg CachedSchemaRegistry) GetSchemaByID(id int) (string, error)
GetSchemaByID :
func (CachedSchemaRegistry) GetSchemaBySubject ¶ added in v4.1.3
func (reg CachedSchemaRegistry) GetSchemaBySubject(subjectStr string, version int) (Schema, error)
GetSchemaBySubject :
type Client ¶ added in v4.1.3
type Client interface { Subjects() (subjects []string, err error) Versions(subject string) (versions []int, err error) RegisterNewSchema(subject, schema string) (int, error) IsRegistered(subject, schema string) (bool, Schema, error) GetSchemaByID(id int) (string, error) GetSchemaBySubject(subject string, ver int) (s Schema, err error) GetLatestSchema(subject string) (s Schema, err error) }
A Client is a client for the schema registry.
type Schema ¶ added in v4.1.3
type Schema struct { Schema string `json:"schema"` // The actual AVRO schema Subject string `json:"subject"` // Subject where the schema is registered for Version int `json:"version"` // Version within this subject ID int `json:"id"` // Registry's unique id }
The Schema type is an object produced by the schema registry.
type ZapLeveledLogger ¶ added in v4.1.3
type ZapLeveledLogger struct {
// contains filtered or unexported fields
}
func NewZapLeveledLogger ¶ added in v4.1.3
func NewZapLeveledLogger(logger *zap.Logger) ZapLeveledLogger
func (ZapLeveledLogger) Debug ¶ added in v4.1.3
func (logger ZapLeveledLogger) Debug(msg string, keysAndValues ...interface{})
func (ZapLeveledLogger) Error ¶ added in v4.1.3
func (logger ZapLeveledLogger) Error(msg string, keysAndValues ...interface{})
func (ZapLeveledLogger) Info ¶ added in v4.1.3
func (logger ZapLeveledLogger) Info(msg string, keysAndValues ...interface{})
func (ZapLeveledLogger) Warn ¶ added in v4.1.3
func (logger ZapLeveledLogger) Warn(msg string, keysAndValues ...interface{})