service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackchannelLogout

type BackchannelLogout struct {
	UserID    string `json:"userid"`
	Timestamp string `json:"timestamp"`
}

BackchannelLogout is emitted when the callback revived from the identity provider

type ClientlogService

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

ClientlogService is the service responsible for user activities

func NewClientlogService

func NewClientlogService(opts ...Option) (*ClientlogService, error)

NewClientlogService returns a clientlog service

func (*ClientlogService) Run

func (cl *ClientlogService) Run() error

Run runs the service

type FileEvent

type FileEvent struct {
	ParentItemID string `json:"parentitemid"`
	ItemID       string `json:"itemid"`
	SpaceID      string `json:"spaceid"`
	InitiatorID  string `json:"initiatorid"`
	Etag         string `json:"etag"`

	// Only in case of sharing (refactor this into separate struct when more fields are needed)
	AffectedUserIDs []string `json:"affecteduserids"`
}

FileEvent is emitted when a file is uploaded/renamed/deleted/...

type Option

type Option func(*Options)

Option for the clientlog service

func Config

func Config(c *config.Config) Option

Config adds the config for the clientlog service

func GatewaySelector

func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option

GatewaySelector adds a grpc client selector for the gateway service

func Logger

func Logger(log log.Logger) Option

Logger configures a logger for the clientlog service

func RegisteredEvents

func RegisteredEvents(e []events.Unmarshaller) Option

RegisteredEvents registers the events the service should listen to

func Stream

func Stream(s events.Stream) Option

Stream configures an event stream for the clientlog service

func TraceProvider

func TraceProvider(tp trace.TracerProvider) Option

TraceProvider adds a tracer provider for the clientlog service

type Options

type Options struct {
	Logger           log.Logger
	Stream           events.Stream
	Config           *config.Config
	GatewaySelector  pool.Selectable[gateway.GatewayAPIClient]
	RegisteredEvents []events.Unmarshaller
	TraceProvider    trace.TracerProvider
}

Options for the clientlog service

Jump to

Keyboard shortcuts

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