xwc1125-pkg

command module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 68 Imported by: 0

README

xwc1125-pkg

简介

xwc1125-pkg golang通用库

功能

  • freecache
  • captcha
  • copier: copy struct to struct
  • mysql: gorm & xorm
  • es
  • kafka
  • redis
  • sqlite
  • email
  • di 基于反射实现依赖注入
  • goinject: fx依赖注入
  • hashring 哈希环
  • jwtauth
  • ldap
  • otp 二次认证
  • pprof二次封装
  • rbac
  • secure
    • checkurl 校验URL的合法性,用于防止跳转漏洞、SSRF漏洞
    • ddm 动态数据掩码,防止敏感数据暴露
    • ipfilter ip过滤
    • password 对密码进行混淆加密
    • safecurl 安全的http请求,防止SSRF
    • shift 位移算法
    • ssrf 判断url是否会触发ssrf
  • snowflake 雪花算法
  • ssh
  • util
  • validator
  • version 版本管理
  • watemark 添加水印

使用

获取包 go get github.com/xwc1125/xwc1125-pkg

证书

xwc1125-pkg 的源码允许用户在遵循 Apache 2.0 开源证书 规则的前提下使用。

版权

Copyright@2022 xwc1125

xwc1125

Documentation

Overview

Package xwc1125_pkg

@author: xwc1125

Directories

Path Synopsis
Package base
Package base
cache
cachefree
Package cachefree
Package cachefree
Package captcha
Package captcha
Package copier
Package copier
Package database
Package database
db_gorm
Package db_gorm
Package db_gorm
db_xorm
Package db_xorm
Package db_xorm
es
Package es
Package es
kafka
Package kafka
Package kafka
redis
Package redis
Package redis
sqlite
Package sqlite
Package sqlite
Package dig
Package dig
Package email
Package email
Package goinject
Package goinject
Package hashring 在理想情况下,每个物理节点受影响的数据量 为其节点缓存数据最的1/4 (X/(N+X))N为原 有物理节点数,X为新加入物理节点数), 也就是集群中已经被缓存的数据有75%可以被继续命中, 和未使用虚拟节点的一致性Hash算法结果相同, 只是解决的负载均衡的问题。
Package hashring 在理想情况下,每个物理节点受影响的数据量 为其节点缓存数据最的1/4 (X/(N+X))N为原 有物理节点数,X为新加入物理节点数), 也就是集群中已经被缓存的数据有75%可以被继续命中, 和未使用虚拟节点的一致性Hash算法结果相同, 只是解决的负载均衡的问题。
Package jsonp Package
Package jsonp Package
Package jwtauth
Package jwtauth
jwtsession
Package jwtsession
Package jwtsession
Package ldap
Package ldap
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
middleware
circuitbreaker
Package circuitbreaker
Package circuitbreaker
circuitbreaker/hystrix
Package hystrix
Package hystrix
circuitbreaker/zerobreaker
Package zerobreaker
Package zerobreaker
Package util
config
Package config
Package config
config/apollo
Package apollo
Package apollo
limiter
Package limiter
Package limiter
limiter/alone/bbr
Package bbr
Package bbr
limiter/alone/leakybucket
Reference uber ratelimit, the different is support no wait take func
Reference uber ratelimit, the different is support no wait take func
limiter/alone/slidingwindow
Package slidingwindow is a generated GoMock package.
Package slidingwindow is a generated GoMock package.
limiter/distributed/leakybucket
Package leakybucket is a generated GoMock package.
Package leakybucket is a generated GoMock package.
limiter/distributed/slidinglog
Package slidinglog is a generated GoMock package.
Package slidinglog is a generated GoMock package.
tracer
Package tracer provides convenience wrapping functionality for tracing feature using OpenTelemetry.
Package tracer provides convenience wrapping functionality for tracing feature using OpenTelemetry.
tracer/plugins
Package plugins
Package plugins
tracer/provider
Package provider
Package provider
tracer/util
Package util
Package util
Package otp
Package otp
pool
groupwork
Package groupwork
Package groupwork
Package pprof
Package pprof
Package protocol
Package protocol
contextx
Package contextx
Package contextx
pmodel
Package pmodel
Package pmodel
Package rbac
Package rbac
Package resourcetree
Package resourcetree
secure
ddm
Package ddm
Package ddm
ipfilter
Package ipfilter
Package ipfilter
password
Package password
Package password
shift
Package shift
Package shift
ssrf
Package ssrf
Package ssrf
Package snowflake
Package snowflake
ssh
scp
Package scp
Package scp
sftpx
Package sftpx
Package sftpx
Package types
Package types
response
Package response
Package response
utils
aesutil
Package aesutil
Package aesutil
base64util
Package base64util
Package base64util
excelutil
Package excelutil
Package excelutil
iputil
Package iputil
Package iputil
iputil/ipv4
Package ipv4 provides useful API for IPv4 address handling.
Package ipv4 provides useful API for IPv4 address handling.
iputil/ipv6
Package ipv6 provides useful API for IPv6 address handling.
Package ipv6 provides useful API for IPv6 address handling.
jsonutil
Package jsonutil
Package jsonutil
kvutil
Package kvutil
Package kvutil
md5util
Package md5util
Package md5util
randutil
Package randutil provides high performance random bytes/number/string generation functionality.
Package randutil provides high performance random bytes/number/string generation functionality.
reflectutil
Package reflectutil
Package reflectutil
regexutil
Package regexutil
Package regexutil
stringutil
Package stringutil
Package stringutil
tcputil
Package tcputil
Package tcputil
ziputil
Package ziputil
Package ziputil
Package validator
Package validator
Package version
Package version
example
Package main
Package main
Package watermark
Package watermark

Jump to

Keyboard shortcuts

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