package api import ( "net/http" "atlas9.dev/c/core" "atlas9.dev/c/core/iam" ) func GroupsApi(mux *http.ServeMux, impl *GroupsImpl) { mux.HandleFunc("POST /Groups.Save", impl.Save) mux.HandleFunc("POST /Groups.Get", impl.Get) mux.HandleFunc("POST /Groups.Delete", impl.Delete) mux.HandleFunc("POST /Groups.List", impl.List) mux.HandleFunc("POST /Groups.ListByTenant", impl.ListByTenant) mux.HandleFunc("POST /Groups.AddMember", impl.AddMember) mux.HandleFunc("POST /Groups.RemoveMember", impl.RemoveMember) mux.HandleFunc("POST /Groups.ListMembers", impl.ListMembers) mux.HandleFunc("POST /Groups.ListMemberGroups", impl.ListMemberGroups) } type Groups_SaveReq struct { Group iam.Group } type Groups_SaveRes struct{} type Groups_GetReq struct { Tenant core.ID Path core.Path } type Groups_DeleteReq struct { Tenant core.ID Path core.Path } type Groups_DeleteRes struct{} type Groups_ListReq struct { Tenant core.ID Page core.PageReq } type Groups_ListRes struct { Page core.Page[iam.Group] } type Groups_ListByTenantReq struct { Tenant core.ID Page core.PageReq } type Groups_AddMemberReq struct { Tenant core.ID Group core.Path UserID core.ID } type Groups_AddMemberRes struct{} type Groups_RemoveMemberReq struct { Tenant core.ID Group core.Path UserID core.ID } type Groups_RemoveMemberRes struct{} type Groups_ListMembersReq struct { Tenant core.ID Group core.Path Page core.PageReq } type Groups_ListMembersRes struct { Page core.Page[core.ID] } type Groups_ListMemberGroupsReq struct { UserID core.ID Page core.PageReq } type Groups_ListMemberGroupsRes struct { Page core.Page[iam.Group] } func (r *Groups_SaveReq) Prepare() error { return nil } func (r *Groups_GetReq) Prepare() error { return nil } func (r *Groups_DeleteReq) Prepare() error { return nil } func (r *Groups_ListReq) Prepare() error { return nil } func (r *Groups_ListByTenantReq) Prepare() error { return nil } func (r *Groups_AddMemberReq) Prepare() error { return nil } func (r *Groups_RemoveMemberReq) Prepare() error { return nil } func (r *Groups_ListMembersReq) Prepare() error { return nil } func (r *Groups_ListMemberGroupsReq) Prepare() error { return nil }