Documentation ¶
Index ¶
Constants ¶
View Source
const ( Empty = "" Token = "token" Zero = 0 )
View Source
const ( Create = "create" Update = "update" Delete = "delete" Get = "get" GetList = "getlist" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClaims ¶
type AuthClaims struct {
jwt.RegisteredClaims
}
type Config ¶
type Config struct { FirstUser struct { Login string `yaml:"login"` Password string `yaml:"password" ` } `yaml:"first_user"` HTTP Server `yaml:"server_http"` JWT struct { TTL time.Duration `yaml:"ttl"` TokenClaims string `yaml:"token_claims"` } SQL struct { PathSQL string `yaml:"path_sql"` PathSQLName string `yaml:"path_sql_name"` Timeout time.Duration `yaml:"timeout"` MaxOpenConns int `yaml:"max_open_conns"` MaxIdleConns int `yaml:"max_idle_conns"` } }
type ExteranlSQL ¶
type ExteranlSQL interface { Get(ctx context.Context, conditional string, values []any) (*UserDB, error) GetList(ctx context.Context) ([]*UserDB, error) Create(ctx context.Context, items map[string]any) error Update(ctx context.Context, items, condition map[string]any) error Delete(ctx context.Context, condition map[string]any) error }
Click to show internal directories.
Click to hide internal directories.