Documentation ¶
Index ¶
- type AuthorizationService
- func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *platform.Authorization) (err error)
- func (s *AuthorizationService) DeleteAuthorization(ctx context.Context, id platform.ID) (err error)
- func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform.ID) (a *platform.Authorization, err error)
- func (s *AuthorizationService) FindAuthorizationByToken(ctx context.Context, t string) (a *platform.Authorization, err error)
- func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, ...) (as []*platform.Authorization, i int, err error)
- func (s *AuthorizationService) SetAuthorizationStatus(ctx context.Context, id platform.ID, status platform.Status) (err error)
- type ProxyQueryService
- type Span
- func (s *Span) BaggageItem(restrictedKey string) string
- func (s *Span) Context() opentracing.SpanContext
- func (s *Span) Finish()
- func (s *Span) FinishWithOptions(opts opentracing.FinishOptions)
- func (s *Span) Log(data opentracing.LogData)
- func (s *Span) LogEvent(event string)
- func (s *Span) LogEventWithPayload(event string, payload interface{})
- func (s *Span) LogFields(fields ...log.Field)
- func (s *Span) LogKV(keyValues ...interface{})
- func (s *Span) SetBaggageItem(restrictedKey string, value string) opentracing.Span
- func (s *Span) SetOperationName(operationName string) opentracing.Span
- func (s *Span) SetTag(key string, value interface{}) opentracing.Span
- func (s *Span) Tracer() opentracing.Tracer
- type SpanContext
- type Tracer
- func (t *Tracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
- func (t *Tracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
- func (t *Tracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationService ¶
type AuthorizationService struct { Logger *zap.Logger AuthorizationService platform.AuthorizationService }
AuthorizationService manages authorizations.
func (*AuthorizationService) CreateAuthorization ¶
func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *platform.Authorization) (err error)
CreateAuthorization creates an authorization, and logs any errors.
func (*AuthorizationService) DeleteAuthorization ¶
DeleteAuthorization deletes an authorization, and logs any errors.
func (*AuthorizationService) FindAuthorizationByID ¶
func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform.ID) (a *platform.Authorization, err error)
FindAuthorizationByID returns an authorization given an id, and logs any errors.
func (*AuthorizationService) FindAuthorizationByToken ¶
func (s *AuthorizationService) FindAuthorizationByToken(ctx context.Context, t string) (a *platform.Authorization, err error)
FindAuthorizationByToken returns an authorization given a token, and logs any errors.
func (*AuthorizationService) FindAuthorizations ¶
func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, opt ...platform.FindOptions) (as []*platform.Authorization, i int, err error)
FindAuthorizations returns authorizations given a filter, and logs any errors.
func (*AuthorizationService) SetAuthorizationStatus ¶
func (s *AuthorizationService) SetAuthorizationStatus(ctx context.Context, id platform.ID, status platform.Status) (err error)
SetAuthorizationStatus updates an authorization's status and logs any errors.
type ProxyQueryService ¶
ProxyQueryService logs the request but does not write to the writer.
func NewProxyQueryService ¶
func NewProxyQueryService(l *zap.Logger) *ProxyQueryService
NewProxyQueryService creates a new proxy query service with a logger. If the logger is nil, then it will use a noop logger.
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span implements opentracing.Span, all Spans must be created using the Tracer.
func (*Span) BaggageItem ¶
func (*Span) Context ¶
func (s *Span) Context() opentracing.SpanContext
func (*Span) FinishWithOptions ¶
func (s *Span) FinishWithOptions(opts opentracing.FinishOptions)
func (*Span) Log ¶
func (s *Span) Log(data opentracing.LogData)
Log is deprecated, as such it is not implemented.
func (*Span) LogEventWithPayload ¶
LogEventWithPayload is deprecated, as such it is not implemented.
func (*Span) SetBaggageItem ¶
func (s *Span) SetBaggageItem(restrictedKey string, value string) opentracing.Span
func (*Span) SetOperationName ¶
func (s *Span) SetOperationName(operationName string) opentracing.Span
func (*Span) Tracer ¶
func (s *Span) Tracer() opentracing.Tracer
type SpanContext ¶
type SpanContext struct {
// contains filtered or unexported fields
}
SpanContext implements opentracing.SpanContext, all span contexts must be created using the Tracer.
func (SpanContext) ForeachBaggageItem ¶
func (c SpanContext) ForeachBaggageItem(handler func(k, v string) bool)
func (SpanContext) MarshalJSON ¶
func (c SpanContext) MarshalJSON() ([]byte, error)
func (*SpanContext) UnmarshalJSON ¶
func (c *SpanContext) UnmarshalJSON(data []byte) error
type Tracer ¶
type Tracer struct { Logger *zap.Logger IDGenerator platform.IDGenerator }
Tracer implements opentracing.Tracer and logs each span as its own log.
func (*Tracer) Extract ¶
func (t *Tracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
func (*Tracer) Inject ¶
func (t *Tracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
func (*Tracer) StartSpan ¶
func (t *Tracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span