logger

package
v0.0.0-...-9a2c5cd Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionCreate Action = "create"
	ActionUpdate Action = "update"
	ActionDelete Action = "delete"
)

func (Action) String

func (a Action) String() string

type Audit

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

func NewAudit

func NewAudit(svc *ConfigService, pub *pubsub.Manager) *Audit

func (*Audit) Create

func (a *Audit) Create(ctx context.Context, user *model.SignedInUser, records map[int64]any) error

func (*Audit) Delete

func (a *Audit) Delete(ctx context.Context, user *model.SignedInUser, records map[int64]any) error

func (*Audit) Update

func (a *Audit) Update(ctx context.Context, user *model.SignedInUser, records map[int64]any) error

type Client

type Client struct {
	ConfigService *ConfigService
	// contains filtered or unexported fields
}

func New

func New(log *wlog.Logger, discovery registry.Discovery) (*Client, error)

func (*Client) HealthCheck

func (c *Client) HealthCheck(ctx context.Context) []health.CheckResult

func (*Client) Shutdown

func (c *Client) Shutdown(p *shutdown.Process) error

type ConfigService

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

func (*ConfigService) Active

func (c *ConfigService) Active(ctx context.Context, domainId int64, object string) (bool, error)

type Message

type Message struct {
	Records        []Record `json:"records,omitempty"`
	RequiredFields `json:"requiredFields"`
}

func (*Message) ToJson

func (m *Message) ToJson() []byte

type Record

type Record struct {
	Id       int64  `json:"id,omitempty"`
	NewState []byte `json:"newState,omitempty"`
}

type RequiredFields

type RequiredFields struct {
	UserId     int64  `json:"userId,omitempty"`
	UserIp     string `json:"userIp,omitempty"`
	Action     Action `json:"action,omitempty"`
	Date       int64  `json:"date,omitempty"`
	DomainId   int64
	ObjectName string
}

Jump to

Keyboard shortcuts

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