package api import ( "net/http" "atlas9.dev/c/core" "atlas9.dev/c/core/iam" ) func RolesApi(mux *http.ServeMux, impl *RolesImpl) { mux.HandleFunc("POST /Roles.Save", impl.Save) mux.HandleFunc("POST /Roles.Get", impl.Get) mux.HandleFunc("POST /Roles.Delete", impl.Delete) mux.HandleFunc("POST /Roles.List", impl.List) mux.HandleFunc("POST /Roles.ListByTenant", impl.ListByTenant) } type Roles_SaveReq struct { Role iam.Role } type Roles_SaveRes struct{} type Roles_GetReq struct { Tenant core.ID Slug string } type Roles_DeleteReq struct { Tenant core.ID Slug string } type Roles_DeleteRes struct{} type Roles_ListReq struct { Tenant core.ID Page core.PageReq } type Roles_ListRes struct { Page core.Page[iam.Role] } type Roles_ListByTenantReq struct { Tenant core.ID Page core.PageReq } func (r *Roles_SaveReq) Prepare() error { return nil } func (r *Roles_GetReq) Prepare() error { return nil } func (r *Roles_DeleteReq) Prepare() error { return nil } func (r *Roles_ListReq) Prepare() error { return nil } func (r *Roles_ListByTenantReq) Prepare() error { return nil }