listener

package
v0.0.0-...-85a7185 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer() *kafka.Reader

Types

type AuthHeader

type AuthHeader struct {
	Identity     Identity     `json:"identity"`
	Entitlements Entitlements `json:"entitlements"`
}

type CostMgmt

type CostMgmt struct {
	IsEntitled bool `json:"is_entitled"`
}

type Entitlements

type Entitlements struct {
	CostManagement CostMgmt `json:"cost_management"`
}

type Identity

type Identity struct {
	AccountNumber string `json:"account_number"`
	Type          string `json:"type"`
	User          User   `json:"user"`
}

type KafkaEvent

type KafkaEvent struct {
	Offset    int64
	Partition int
	Topic     string

	EventType   string      `json:"event_type"`
	ResourceID  int         `json:"resource_id"`
	SourceID    int         `json:"source_id"`
	AuthType    string      `json:"authtype"`
	AuthHeader  *AuthHeader `json:"auth_header"`
	EncodedAuth string
}

func GetMsgData

func GetMsgData(m *kafka.Message) KafkaEvent

type User

type User struct {
	Username   string `json:"username"`
	Email      string `json:"email"`
	IsOrgAdmin bool   `json:"is_org_admin"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL