package api import ( "net/http" "atlas9.dev/c/core" "atlas9.dev/c/core/iam" ) func GrantsApi(mux *http.ServeMux, impl *GrantsImpl) { mux.HandleFunc("POST /Grants.Add", impl.Add) mux.HandleFunc("POST /Grants.Remove", impl.Remove) mux.HandleFunc("POST /Grants.List", impl.List) mux.HandleFunc("POST /Grants.ListByTenant", impl.ListByTenant) } type Grants_AddReq struct { Grant iam.Grant } type Grants_AddRes struct{} type Grants_RemoveReq struct { Grant iam.Grant } type Grants_RemoveRes struct{} type Grants_ListReq struct { UserID core.ID Page core.PageReq } type Grants_ListRes struct { Page core.Page[iam.Grant] } type Grants_ListByTenantReq struct { Tenant core.ID Page core.PageReq } func (r *Grants_AddReq) Prepare() error { return nil } func (r *Grants_RemoveReq) Prepare() error { return nil } func (r *Grants_ListReq) Prepare() error { return nil } func (r *Grants_ListByTenantReq) Prepare() error { return nil }