Documentation ¶
Index ¶
- Variables
- type Alias
- type CreateUserRequest
- type CreateUserResponse
- type Database
- type DeleteUserRequest
- type ErrorResponse
- type GetUserRequest
- type OpenFGA
- func (m *OpenFGA) CreateUser(c echo.Context) error
- func (m *OpenFGA) DSL2JSON(c echo.Context) error
- func (m *OpenFGA) DeleteUser(c echo.Context) error
- func (m *OpenFGA) GetUser(c echo.Context) error
- func (m *OpenFGA) GetUsers(c echo.Context) error
- func (m *OpenFGA) Internal(c echo.Context, trimPath string) error
- func (m *OpenFGA) JSON2DSL(c echo.Context) error
- func (m *OpenFGA) Middleware(ctx context.Context, _ string) (echo.MiddlewareFunc, error)
- func (m *OpenFGA) Migration(ctx context.Context) error
- func (m *OpenFGA) PatchUser(c echo.Context) error
- func (m *OpenFGA) Proxy(c echo.Context, trimPath string) error
- func (m *OpenFGA) PutUser(c echo.Context) error
- func (m *OpenFGA) SetFs() (echo.MiddlewareFunc, error)
- type PatchUserRequest
- type PutUserRequest
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConnMaxLifetime = 15 * time.Minute MaxIdleConns = 3 MaxOpenConns = 5 )
View Source
var SQLMigration = []string{
`CREATE TABLE IF NOT EXISTS user_list
(
id text not null
constraint user_list_pk
primary key,
alias jsonb not null,
details jsonb
);
create index IF NOT EXISTS user_list_alias_index
on user_list USING gin (alias);`,
}
Functions ¶
This section is empty.
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
Alias []string `json:"alias"`
}
type CreateUserResponse ¶
type CreateUserResponse struct {
ID string `json:"id"`
}
type DeleteUserRequest ¶
type DeleteUserRequest struct {
ID string `json:"id" query:"id"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error,omitempty"`
}
type GetUserRequest ¶
type OpenFGA ¶
type OpenFGA struct { PrefixPath string `cfg:"prefix_path"` APIURL string `cfg:"api_url"` InsecureSkipVerify bool `cfg:"insecure_skip_verify"` Database Database `cfg:"database"` // contains filtered or unexported fields }
func (*OpenFGA) CreateUser ¶
func (*OpenFGA) DeleteUser ¶
func (*OpenFGA) Middleware ¶
type PatchUserRequest ¶
type PutUserRequest ¶
type PutUserRequest PatchUserRequest
Click to show internal directories.
Click to hide internal directories.