Documentation ¶
Index ¶
- Variables
- func ComputeClientName(user, group, clientName, salt string) string
- type Authorization
- func (a *Authorization) FilterAndRedactEvents(user *User, group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
- func (a *Authorization) FilterEvents(user *User, group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
- func (a *Authorization) GetUserAndGroup(username string) (*User, *Group, error)
- func (a *Authorization) IsAuthorized(token string) (string, error)
- func (a *Authorization) IsAuthorizedBasic(username, password string) (bool, error)
- func (a *Authorization) RedactEvents(group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
- func (a *Authorization) Start(ctx context.Context) error
- type AuthorizationConfig
- type Group
- func (g *Group) ApplyFilter(events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
- func (g *Group) ApplyRedacter(events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
- func (g *Group) ComputeClientName(user, salt, clientName string) string
- func (g *Group) EventFilter() xatu.EventFilter
- func (g *Group) Name() string
- func (g *Group) ShouldObscureClientName() bool
- func (g *Group) Start(ctx context.Context)
- func (g *Group) Users() *Users
- func (g *Group) ValidUser(username, password string) bool
- type GroupConfig
- type GroupMetrics
- type Groups
- type GroupsConfig
- type User
- type UserConfig
- type Users
- type UsersConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultGroupMetrics = NewGroupMetrics("xatu_event_ingester")
)
Functions ¶
func ComputeClientName ¶
Types ¶
type Authorization ¶
type Authorization struct {
// contains filtered or unexported fields
}
func NewAuthorization ¶
func NewAuthorization(log logrus.FieldLogger, config AuthorizationConfig) (*Authorization, error)
func (*Authorization) FilterAndRedactEvents ¶
func (a *Authorization) FilterAndRedactEvents(user *User, group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
func (*Authorization) FilterEvents ¶
func (a *Authorization) FilterEvents(user *User, group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
func (*Authorization) GetUserAndGroup ¶
func (a *Authorization) GetUserAndGroup(username string) (*User, *Group, error)
func (*Authorization) IsAuthorized ¶
func (a *Authorization) IsAuthorized(token string) (string, error)
func (*Authorization) IsAuthorizedBasic ¶
func (a *Authorization) IsAuthorizedBasic(username, password string) (bool, error)
func (*Authorization) RedactEvents ¶
func (a *Authorization) RedactEvents(group *Group, events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
type AuthorizationConfig ¶
type AuthorizationConfig struct { Enabled bool Groups GroupsConfig }
func (*AuthorizationConfig) Validate ¶
func (a *AuthorizationConfig) Validate() error
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) ApplyFilter ¶
func (g *Group) ApplyFilter(events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
func (*Group) ApplyRedacter ¶
func (g *Group) ApplyRedacter(events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
func (*Group) ComputeClientName ¶
func (*Group) EventFilter ¶
func (g *Group) EventFilter() xatu.EventFilter
func (*Group) ShouldObscureClientName ¶
type GroupConfig ¶
type GroupConfig struct { Users UsersConfig EventFilter *xatu.EventFilterConfig `yaml:"eventFilter"` Redacter *xatu.RedacterConfig `yaml:"redacter"` ObscureClientNames bool `yaml:"obscureClientNames"` }
func (*GroupConfig) Validate ¶
func (g *GroupConfig) Validate() error
type GroupMetrics ¶
type GroupMetrics struct {
// contains filtered or unexported fields
}
func NewGroupMetrics ¶
func NewGroupMetrics(namespace string) *GroupMetrics
func (*GroupMetrics) IncFieldsRedacted ¶
func (m *GroupMetrics) IncFieldsRedacted(group, path string)
type GroupsConfig ¶
type GroupsConfig map[string]GroupConfig
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) ApplyFilter ¶
func (u *User) ApplyFilter(events []*xatu.DecoratedEvent) ([]*xatu.DecoratedEvent, error)
func (*User) ValidClientName ¶
type UserConfig ¶
type UserConfig struct { Password string `yaml:"password"` EventFilter *xatu.EventFilterConfig `yaml:"eventFilter"` }
func (*UserConfig) Validate ¶
func (u *UserConfig) Validate() error
type UsersConfig ¶
type UsersConfig map[string]UserConfig
Click to show internal directories.
Click to hide internal directories.