package api import ( "atlas9.dev/c/core" "atlas9.dev/c/core/iam" ) const ( Path_Tenants_Create = "POST /Tenants_Create" Path_Tenants_Update = "POST /Tenants_Update" Path_Tenants_Get = "POST /Tenants_Get" Path_Tenants_Delete = "POST /Tenants_Delete" Path_Tenants_List = "POST /Tenants_List" ) type Tenants_CreateReq struct { Tenant iam.Tenant } type Tenants_CreateRes struct { Tenant iam.Tenant } type Tenants_UpdateReq struct { Tenant iam.Tenant } type Tenants_UpdateRes struct { Tenant iam.Tenant } type Tenants_GetReq struct { ID core.ID } type Tenants_GetRes struct { Tenant iam.Tenant } type Tenants_DeleteReq struct { ID core.ID } type Tenants_DeleteRes struct{} type Tenants_ListReq struct { Page core.PageReq } type Tenants_ListRes struct { Page core.Page[iam.Tenant] } func (r *Tenants_CreateReq) Prepare() error { r.Tenant.ID = core.NewID("t") return r.Tenant.Validate() } func (r *Tenants_UpdateReq) Prepare() error { if r.Tenant.ID.IsEmpty() { return iam.ErrTenantIDEmpty } return r.Tenant.Validate() } func (r *Tenants_GetReq) Prepare() error { return nil } func (r *Tenants_DeleteReq) Prepare() error { return nil } func (r *Tenants_ListReq) Prepare() error { return nil }