oprlog

package
v0.0.0-...-9489f8d Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

*

  • @Author: kwens
  • @Date: 2022-08-10 16:52:06
  • @Description:

*

  • @Author: kwens
  • @Date: 2022-08-10 15:51:18
  • @Description:

*

  • @Author: kwens
  • @Date: 2022-08-10 16:11:08
  • @Description:

*

  • @Author: kwens
  • @Date: 2022-08-10 16:39:33
  • @Description:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadOprLog

func LoadOprLog()

func RegisterRepo

func RegisterRepo(repo OprLogRepository)

func Start

func Start()

Types

type OprLog

type OprLog struct {
	ID        string
	OprModule string
	OprType   string
	Operator  string
	OprTime   string
	OprIp     string
	OprValue  string
	OriValue  string
}

func NewOprLog

func NewOprLog(
	OprModule string,
	OprType string,
	Operator string,
	OprIp string,
	OprValue string,
	OriValue string,
) OprLog

func (OprLog) String

func (l OprLog) String() string

type OprLogClient

type OprLogClient struct {
	OprLogChan chan OprLog

	OprHandle map[string]OprValue
	// contains filtered or unexported fields
}
var (
	OprLogCli *OprLogClient
)

func NewOprLogClient

func NewOprLogClient() *OprLogClient

func (*OprLogClient) GetValue

func (c *OprLogClient) GetValue(k string) OprValue

func (*OprLogClient) RegisterValue

func (c *OprLogClient) RegisterValue(k string, v OprValue)

func (*OprLogClient) Write

func (c *OprLogClient) Write(log OprLog)

type OprLogRepository

type OprLogRepository interface {
	Write(log OprLog) error
}

type OprValue

type OprValue struct {
	OprModule string
	OprType   string
}

Jump to

Keyboard shortcuts

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