lib

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGroupRight

func DeleteGroupRight(kind, resource, group string) error

func DeleteUserRight

func DeleteUserRight(kind, resource, user string) error

func GetBroker

func GetBroker(bootstrapUrl string) (brokers []string, err error)

func GetKafkaWriter

func GetKafkaWriter(broker []string, topic string, debug bool) (writer *kafka.Writer, err error)

func HandleDefaultValues

func HandleDefaultValues(config ConfigType)

func HandleEnvironmentVars

func HandleEnvironmentVars(config ConfigType)

preparations for docker

func HasAdminRight

func HasAdminRight(impersonate string, kind string, id string) error

func InitEventConn

func InitEventConn()

func InitTopic

func InitTopic(bootstrapUrl string, topics ...string) (err error)

func LoadConfig

func LoadConfig(location string) error

func SetGroupRight

func SetGroupRight(kind, resource, group, right string) error

func SetUserRight

func SetUserRight(kind, resource, user, right string) error

func StartApi

func StartApi()

func StopEventConn

func StopEventConn()

Types

type ConfigStruct

type ConfigStruct struct {
	ServerPort string
	LogLevel   string

	PermissionsViewUrl string
	KafkaUrl           string

	PermTopic string
}

type ConfigType

type ConfigType *ConfigStruct
var Config ConfigType

type PermCommandMsg

type PermCommandMsg struct {
	Command  string `json:"command"`
	Kind     string
	Resource string
	User     string
	Group    string
	Right    string
}

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher() (*Publisher, error)

func (*Publisher) Publish

func (this *Publisher) Publish(command PermCommandMsg) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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