Brijesh's Git Server — watchman @ 2d4643bb2dffa04d3cc31d7ef64331bd819bdd5a

observability tool, needs to be rewritten once identity is stable

schema/types.go (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
package schema

import "github.com/golang-jwt/jwt/v5"

type Response_Type struct {
	Data      interface{} `json:"data,omitempty"`
	Status    string      `json:"status"`
	Message   string      `json:"message"`
	RequestID string      `json:"request_id"`
}

type RequestIDKey struct{}

type UsernameKey struct{}

type ConfigType struct {
	Admin struct {
		Username string `yaml:"username"`
		Password string `yaml:"password"`
	} `yaml:"admin"`
	JwtKey                     string `yaml:"jwt_key"`
	Port                       int    `yaml:"port"`
	RateLimitRequestsPerSecond int    "yaml:\"rate_limit_req_per_sec\""
}

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Claims struct {
	Username string `json:"username"`
	jwt.RegisteredClaims
}