iam-kit

command module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 1 Imported by: 0

README

CI

IAM Kit

错误码

格式

错误码为6位数字,每2位为1组,分别代表服务(1-2位) + 模块(3-4位) + 错误编号(5-6位)。示例:

# 10(通用错误)+ 01(认证/授权模块)+ 05(token过期)
100105
错误码段
  1. 通用:10XXYY
  2. iam-apiserver:11XXYY
  3. iam-authz-server:12XXYY
  4. iam-pump:13XXYY
通用错误码

error_code_base.md

TODO

  1. init最佳实践
  2. config最佳实践
  • load config独立出来,不只是server需要load
  1. errors最佳实践(参考kratos公众号文章)
  2. logger最佳实践
  • withValues
  • WithContext
  • FromContext
  • global singleton
  • L()
  1. mysql logger
  2. test
  3. policy audit
  4. migrate
  5. metrics
  6. profiling
  7. version
  8. list selector
  9. server可以只创建http/grpc server
  10. db接口的opts有什么用
  11. delete不存在的数据,会报错吗
  12. validate

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cache is a cache instance builder.
Package cache is a cache instance builder.
Package code defines the base errors with corresponding error code.
Package code defines the base errors with corresponding error code.
Package config manages the configuration of IAM platform.
Package config manages the configuration of IAM platform.
Package db is a db instance builder.
Package db is a db instance builder.
Package errcoder implements `github.com/marmotedu/errors` Coder interface.
Package errcoder implements `github.com/marmotedu/errors` Coder interface.
Package httputil provide useful functions to handle http response.
Package httputil provide useful functions to handle http response.
Package meta contains API types that are common to all versions.
Package meta contains API types that are common to all versions.
Package middleware defines multiple gin middlewares.
Package middleware defines multiple gin middlewares.
auth
Package auth defines authentication strategy like Basic, Bearer.
Package auth defines authentication strategy like Basic, Bearer.
Package server is a server builder.
Package server is a server builder.
Package shutdown assumes the responsibility of graceful shutdown of the server.
Package shutdown assumes the responsibility of graceful shutdown of the server.
tools
codegen
Package codegen is a tool to automate the creation of code init function and generate document.
Package codegen is a tool to automate the creation of code init function and generate document.
Package util defines util functions for IAM platform.
Package util defines util functions for IAM platform.

Jump to

Keyboard shortcuts

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