filebrowser

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 11 Imported by: 0

README

filebrowser

Go version tests filebrowser

A minimal web filebrowser in Go

Documentation

Index

Constants

View Source
const (
	EventKindCreated = "created"
	EventKindDeleted = "deleted"
	ExchangeType     = "fanout"
)

Variables

View Source
var (
	ErrUnknown       = errors.New("E001")
	ErrNotFound      = errors.New("E002")
	ErrNotAvailable  = errors.New("E003")
	ErrUnauthorized  = errors.New("E004")
	ErrInvalidToken  = errors.New("E005")
	ErrInvalidFormat = errors.New("E006")
	ErrInvalidHeader = errors.New("E007")
	ErrAlreadyExists = errors.New("E010")

	ErrChannelClosed    = errors.New("channel closed")
	ErrProtectedContent = errors.New("protected content")
	ErrUnidentified     = errors.New("unidentified")
)

Functions

func GetUidFromGrpcCtx

func GetUidFromGrpcCtx(ctx context.Context, header string, logger *zap.Logger) (int32, error)

func GetUidFromHttpRequest

func GetUidFromHttpRequest(r *http.Request, header string, logger *zap.Logger) (int32, error)

func NewMongoDBConn

func NewMongoDBConn(uri, database string) (*mongo.Database, error)

Types

type EventHandler

type EventHandler func(ctx context.Context, body []byte)

type RabbitMqEventBus

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

func NewRabbitMqEventBus

func NewRabbitMqEventBus(chann *amqp.Channel, logger *zap.Logger) *RabbitMqEventBus

func (*RabbitMqEventBus) Chann

func (bus *RabbitMqEventBus) Chann() *amqp.Channel

func (*RabbitMqEventBus) Consume

func (bus *RabbitMqEventBus) Consume(ctx context.Context, queue string, handler EventHandler) error

func (*RabbitMqEventBus) QueueBind

func (bus *RabbitMqEventBus) QueueBind(exchange, queue string) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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