admin_common

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CombinatorAND = orisun.IndexCombinatorAND
View Source
const CombinatorOR = orisun.IndexCombinatorOR

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(hashedPassword string, password string) error

func GetCurrentUser

func GetCurrentUser(r *http.Request) *orisun.User

func HashPassword

func HashPassword(password string) (string, error)

Types

type DB

type DB interface {
	ListAdminUsers() ([]*orisun.User, error)
	GetProjectorLastPosition(projectorName string) (*orisun.Position, error)
	UpdateProjectorPosition(name string, position *orisun.Position) error
	UpsertUser(user orisun.User) error
	DeleteUser(id string) error
	GetUserByUsername(username string) (orisun.User, error)
	GetUserById(username string) (orisun.User, error)
	GetUsersCount() (uint32, error)
	SaveUsersCount(uint32) error
	GetEventsCount(boundary string) (int, error)
	SaveEventCount(int, string) error
	orisun.BoundaryIndexManager
}

type GetEventsType

type GetEventsType = func(ctx context.Context, in *orisun.GetEventsRequest) (*orisun.GetEventsResponse, error)

type GetProjectorLastPositionType

type GetProjectorLastPositionType = func(projectorName string) (*orisun.Position, error)

type IndexCondition added in v0.2.0

type IndexCondition = orisun.BoundaryIndexCondition

type IndexField added in v0.2.0

type IndexField = orisun.BoundaryIndexField

type PublishRequest

type PublishRequest struct {
	Id      string `json:"id"`
	Subject string `json:"subject"`
	Data    []byte `json:"data"`
}

type PublishToPubSubType

type PublishToPubSubType = func(ctx context.Context, req *PublishRequest) error

type SaveEventsType

type SaveEventsType = func(ctx context.Context, in *orisun.SaveEventsRequest) (resp *orisun.WriteResult, err error)

type SubscribeToEventStoreType

type SubscribeToEventStoreType = func(
	ctx context.Context,
	boundary string,
	subscriberName string,
	pos *orisun.Position,
	query *orisun.Query,
	handler *orisun.MessageHandler[orisun.Event],
) error

type UpdateProjectorPositionType

type UpdateProjectorPositionType = func(projectorName string, position *orisun.Position) error

Jump to

Keyboard shortcuts

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