http
import "github.com/prescriptoo/prescriptoo-api/services/organization/internal/presentation/http"Package http owns this service's audit HTTP endpoints. Audit itself has no router.
Package http provides HTTP/REST presentation handlers.
Index
- type AddMemberInput
- type AssignMemberTeamHTTPInput
- type AssignRoleInput
- type AuditDetailInput
- type AuditHandler
- type AuditListInput
- type AuditScopeInput
- type AuthHandler
- type AuthenticatedInput
- type AuthorizationAssignRoleInput
- type AuthorizationAssignmentInput
- type AuthorizationCapabilities
- type AuthorizationCreateRoleInput
- type AuthorizationDeleteRoleInput
- type AuthorizationHandler
- type AuthorizationMemberInput
- type AuthorizationOverrideInput
- type AuthorizationRemoveOverrideInput
- type AuthorizationRevokeRoleInput
- type AuthorizationRoleInput
- type AuthorizationScopeInput
- type AuthorizationSetOverrideInput
- type AuthorizationSetRolePermissionsInput
- type AuthorizationUpdateRoleInput
- type DoctorInput
- type EditMemberInput
- type Handler
- func NewHandler(createOrgUC *usecase.CreateOrganizationUseCase, getOrgUC *usecase.GetOrganizationUseCase, listOrgsUC *usecase.ListOrganizationsUseCase, inviteMemberUC *usecase.InviteMemberUseCase, acceptInviteUC *usecase.AcceptInvitationUseCase, listMembersUC *usecase.ListMembersUseCase, updateRoleUC *usecase.UpdateMemberRoleUseCase, removeMemberUC *usecase.RemoveMemberUseCase, setActiveCtxUC *usecase.SetActiveContextUseCase, createTeamUC *usecase.CreateTeamUseCase, listTeamsUC *usecase.ListTeamsUseCase) *Handler
- func (h *Handler) CreateOrganization(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateTeam(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetOrganization(ctx context.Context, w http.ResponseWriter, id string)
- func (h *Handler) InviteMember(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListMembers(ctx context.Context, w http.ResponseWriter, orgID string)
- func (h *Handler) ListOrganizations(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListTeams(ctx context.Context, w http.ResponseWriter, orgID string)
- func (h *Handler) RegisterRoutes(mux *http.ServeMux)
- func (h *Handler) RemoveMember(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetActiveContext(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateMemberRole(ctx context.Context, w http.ResponseWriter, r *http.Request)
- type InvitationInput
- type InviteDoctorInput
- type ListInput
- type ManagementHandler
- type MemberInput
- type OrgAuthVerifyBodyDto
- type OrgAuthVerifyDataDto
- type OrgAuthVerifyIdentityDto
- type OrgAuthVerifyMemberDto
- type OrgAuthVerifyOrganizationDto
- type OrgAuthVerifyReqDto
- type OrgAuthVerifyResDto
- type OrgLoginReqDto
- type OrgLoginResDto
- type OrgProfileBodyDto
- type OrgProfileDetailsDto
- type OrgProfileDto
- type OrgProfileGetReqDto
- type OrgProfileGetResDto
- type OrgProfileRoleDto
- type OrganizationDoctorsBody
- type OrganizationDoctorsInput
- type OrganizationDoctorsOutput
- type OrganizationInput
- type OrganizationListInput
- type PaginationInput
- type PatchAffiliationHTTPInput
- type PatchPortalOrganizationHTTPInput
- type PatchTeamHTTPInput
- type PortalHandler
- type PortalOutput
- type ProfileHandler
- type RequestInput
- type TeamHTTPInput
type AddMemberInput
AddMemberInput contains the add member request parameters.
type AddMemberInput struct {
OrganizationInput
Body usecase.AddMemberParams
}func (*AddMemberInput) Resolve
func (i *AddMemberInput) Resolve(_ huma.Context) []errorResolve validates identity-source exclusivity before dispatching to the TODO use case.
type AssignMemberTeamHTTPInput
AssignMemberTeamHTTPInput requires a membership ID and a team assignment or explicit clearing.
type AssignMemberTeamHTTPInput struct {
MemberInput
Body usecase.AssignMemberTeamParams
}type AssignRoleInput
AssignRoleInput contains the assign role request parameters.
type AssignRoleInput struct {
MemberInput
Body usecase.AssignMemberRoleParams
}type AuditDetailInput
AuditDetailInput identifies an event within the requested service-owned history.
type AuditDetailInput struct {
AuditScopeInput
EventID string `path:"eventId" format:"uuid"`
}type AuditHandler
AuditHandler serves this service's authenticated audit list and detail endpoints.
type AuditHandler struct {
// contains filtered or unexported fields
}func NewAuditHandler
func NewAuditHandler(identity types.IIdentityService, lister audit.EventLister, reader audit.EventReader) *AuditHandlerNewAuditHandler constructs the service-owned history HTTP adapter.
func (*AuditHandler) RegisterHuma
func (h *AuditHandler) RegisterHuma(api huma.API)RegisterHuma registers the history endpoints on the owning service's HTTP API.
type AuditListInput
AuditListInput contains validated history filter and pagination parameters.
type AuditListInput struct {
AuditScopeInput
ActorUserID string `query:"actor_user_id" format:"uuid"`
Name string `query:"event_name" maxLength:"150"`
ResourceType string `query:"resource_type" maxLength:"100"`
ResourceID string `query:"resource_id" maxLength:"250"`
OperationID string `query:"operation_id" format:"uuid"`
From time.Time `query:"from" doc:"Inclusive event time, RFC 3339."`
To time.Time `query:"to" doc:"Exclusive event time, RFC 3339."`
Limit int `query:"limit" default:"20" minimum:"1" maximum:"100"`
Cursor string `query:"cursor" maxLength:"2048"`
}type AuditScopeInput
AuditScopeInput carries authenticated HTTP parameters for the service-owned history.
type AuditScopeInput struct {
Authorization string `header:"Authorization" hidden:"true"`
OrganizationID string `path:"organizationId" format:"uuid"`
}type AuthHandler
AuthHandler delivers organization authentication operations.
type AuthHandler struct {
// contains filtered or unexported fields
}func NewAuthHandler
func NewAuthHandler(verifyAuth *usecase.VerifyAuthUseCase, login *usecase.LoginUseCase) *AuthHandlerNewAuthHandler constructs organization authentication HTTP handlers.
func (*AuthHandler) RegisterHuma
func (h *AuthHandler) RegisterHuma(api huma.API)RegisterHuma registers organization authentication routes and their contracts.
type AuthenticatedInput
AuthenticatedInput carries documented bearer credentials; TODO stubs do not enforce authentication.
type AuthenticatedInput struct {
Authorization string `header:"Authorization" hidden:"true"`
}type AuthorizationAssignRoleInput
AuthorizationAssignRoleInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationAssignRoleInput struct {
AuthorizationAssignmentInput
Body struct {
ExpectedVersion int64 `json:"expected_version" minimum:"0"`
}
}type AuthorizationAssignmentInput
AuthorizationAssignmentInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationAssignmentInput struct {
AuthorizationMemberInput
RoleID string `path:"roleId" format:"uuid"`
}type AuthorizationCapabilities
AuthorizationCapabilities groups individually injectable authorization operation interfaces.
type AuthorizationCapabilities struct {
ListPermissions p.PermissionLister
ListRoles p.RoleLister
GetRole p.RoleReader
CreateRole p.RoleCreator
UpdateRole p.RoleEditor
DeleteRole p.RoleDeleter
SetRolePermissions p.RolePermissionSetter
GetMemberAuthorization p.MemberAuthorizationReader
AssignRole p.RoleAssigner
RevokeRole p.RoleRevoker
SetMemberPermission p.MemberPermissionSetter
RemoveMemberPermission p.MemberPermissionRemover
}type AuthorizationCreateRoleInput
AuthorizationCreateRoleInput supplies a new scoped role definition.
type AuthorizationCreateRoleInput struct {
AuthorizationScopeInput
Body struct {
Name string `json:"name" minLength:"1" maxLength:"100"`
Slug string `json:"slug" pattern:"^[a-z][a-z0-9_]{0,99}$"`
Description string `json:"description,omitempty" maxLength:"2000"`
Permissions []p.PermissionGrant `json:"permissions" maxItems:"500" nullable:"false"`
}
}type AuthorizationDeleteRoleInput
AuthorizationDeleteRoleInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationDeleteRoleInput struct {
AuthorizationRoleInput
ExpectedVersion int64 `query:"expected_version" minimum:"1" required:"true"`
}type AuthorizationHandler
AuthorizationHandler adapts scoped authorization capabilities to the owning service's HTTP routes.
type AuthorizationHandler struct {
// contains filtered or unexported fields
}func NewAuthorizationHandler
func NewAuthorizationHandler(identity types.IIdentityService, caps AuthorizationCapabilities) *AuthorizationHandlerNewAuthorizationHandler constructs authenticated authorization HTTP handlers.
func (*AuthorizationHandler) RegisterHuma
func (h *AuthorizationHandler) RegisterHuma(api huma.API)RegisterHuma registers authenticated Organization authorization management endpoints.
func (*AuthorizationHandler) SetAuditAccounts
func (h *AuthorizationHandler) SetAuditAccounts(accounts identitypublic.AccountReader)SetAuditAccounts supplies trusted actor-name lookup before requests are served.
type AuthorizationMemberInput
AuthorizationMemberInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationMemberInput struct {
AuthorizationScopeInput
UserID string `path:"userId" format:"uuid" doc:"Identity user ID of the member, not the membership ID."`
}type AuthorizationOverrideInput
AuthorizationOverrideInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationOverrideInput struct {
AuthorizationMemberInput
Permission p.PermissionKey `path:"permission" minLength:"1" maxLength:"150"`
Access p.ResourceAccess `path:"access" enum:"own,any"`
}type AuthorizationRemoveOverrideInput
AuthorizationRemoveOverrideInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationRemoveOverrideInput struct {
AuthorizationOverrideInput
ExpectedVersion int64 `query:"expected_version" minimum:"0" required:"true"`
}type AuthorizationRevokeRoleInput
AuthorizationRevokeRoleInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationRevokeRoleInput struct {
AuthorizationAssignmentInput
ExpectedVersion int64 `query:"expected_version" minimum:"0" required:"true"`
}type AuthorizationRoleInput
AuthorizationRoleInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationRoleInput struct {
AuthorizationScopeInput
RoleID string `path:"roleId" minLength:"1"`
}type AuthorizationScopeInput
AuthorizationScopeInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationScopeInput struct {
Authorization string `header:"Authorization" hidden:"true"`
OrganizationID string `path:"organizationId" format:"uuid" doc:"Organization identifier."`
}type AuthorizationSetOverrideInput
AuthorizationSetOverrideInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationSetOverrideInput struct {
AuthorizationOverrideInput
Body struct {
Effect p.Effect `json:"effect" enum:"allow,deny"`
ExpectedVersion int64 `json:"expected_version" minimum:"0"`
}
}type AuthorizationSetRolePermissionsInput
AuthorizationSetRolePermissionsInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationSetRolePermissionsInput struct {
AuthorizationRoleInput
Body struct {
Permissions []p.PermissionGrant `json:"permissions" maxItems:"500" nullable:"false"`
ExpectedVersion int64 `json:"expected_version" minimum:"1"`
}
}type AuthorizationUpdateRoleInput
AuthorizationUpdateRoleInput contains validated HTTP parameters for the scoped authorization operation.
type AuthorizationUpdateRoleInput struct {
AuthorizationRoleInput
Body struct {
Name string `json:"name" minLength:"1" maxLength:"100"`
Description string `json:"description" maxLength:"2000"`
ExpectedVersion int64 `json:"expected_version" minimum:"1"`
}
}type DoctorInput
DoctorInput contains the doctor request parameters.
type DoctorInput struct {
OrganizationInput
DoctorID string `path:"doctorId" minLength:"1"`
}type EditMemberInput
EditMemberInput contains the edit member request parameters.
type EditMemberInput struct {
MemberInput
Body usecase.EditMemberParams
}type Handler
Handler wraps use cases for HTTP delivery.
type Handler struct {
// contains filtered or unexported fields
}func NewHandler
func NewHandler(createOrgUC *usecase.CreateOrganizationUseCase, getOrgUC *usecase.GetOrganizationUseCase, listOrgsUC *usecase.ListOrganizationsUseCase, inviteMemberUC *usecase.InviteMemberUseCase, acceptInviteUC *usecase.AcceptInvitationUseCase, listMembersUC *usecase.ListMembersUseCase, updateRoleUC *usecase.UpdateMemberRoleUseCase, removeMemberUC *usecase.RemoveMemberUseCase, setActiveCtxUC *usecase.SetActiveContextUseCase, createTeamUC *usecase.CreateTeamUseCase, listTeamsUC *usecase.ListTeamsUseCase) *HandlerNewHandler creates a new HTTP handler instance.
func (*Handler) CreateOrganization
func (h *Handler) CreateOrganization(ctx context.Context, w http.ResponseWriter, r *http.Request)CreateOrganization creates an organization and its creator's administrator membership.
func (*Handler) CreateTeam
func (h *Handler) CreateTeam(ctx context.Context, w http.ResponseWriter, r *http.Request)CreateTeam creates a team in the organization identified in the request.
func (*Handler) GetOrganization
func (h *Handler) GetOrganization(ctx context.Context, w http.ResponseWriter, id string)GetOrganization writes the organization identified by id.
func (*Handler) InviteMember
func (h *Handler) InviteMember(ctx context.Context, w http.ResponseWriter, r *http.Request)InviteMember creates a pending organization membership from the request.
func (*Handler) ListMembers
func (h *Handler) ListMembers(ctx context.Context, w http.ResponseWriter, orgID string)ListMembers writes the memberships of the specified organization.
func (*Handler) ListOrganizations
func (h *Handler) ListOrganizations(ctx context.Context, w http.ResponseWriter, r *http.Request)ListOrganizations writes organizations for the user identified by the request.
func (*Handler) ListTeams
func (h *Handler) ListTeams(ctx context.Context, w http.ResponseWriter, orgID string)ListTeams writes the teams belonging to the specified organization.
func (*Handler) RegisterRoutes
func (h *Handler) RegisterRoutes(mux *http.ServeMux)RegisterRoutes registers preserved legacy operations. Portal contracts use Huma.
func (*Handler) RemoveMember
func (h *Handler) RemoveMember(ctx context.Context, w http.ResponseWriter, r *http.Request)RemoveMember handles removal of an unprotected organization membership.
func (*Handler) SetActiveContext
func (h *Handler) SetActiveContext(ctx context.Context, w http.ResponseWriter, r *http.Request)SetActiveContext selects the caller's active organization and writes an acknowledgment.
func (*Handler) UpdateMemberRole
func (h *Handler) UpdateMemberRole(ctx context.Context, w http.ResponseWriter, r *http.Request)UpdateMemberRole updates the role of the membership identified in the request.
type InvitationInput
InvitationInput contains the invitation request parameters.
type InvitationInput struct {
OrganizationInput
InvitationID string `path:"invitationId" minLength:"1"`
}type InviteDoctorInput
InviteDoctorInput contains the invite doctor request parameters.
type InviteDoctorInput struct {
OrganizationInput
Body usecase.InviteDoctorParams
}type ListInput
ListInput contains the list request parameters.
type ListInput struct {
AuthenticatedInput
PaginationInput
}type ManagementHandler
ManagementHandler wires documentation-first operations to individual stub use cases.
type ManagementHandler struct {
PatchDoctorAffiliation managementExecutor[usecase.PatchDoctorAffiliationInput, organizationpublic.DoctorAffiliation]
PatchPortalOrganization managementExecutor[usecase.PatchPortalOrganizationInput, organizationpublic.Organization]
GetActiveOrganizationContext managementExecutor[usecase.GetActiveOrganizationContextInput, usecase.ActiveOrganizationContext]
GetOrganizationTeam managementExecutor[usecase.GetOrganizationTeamInput, usecase.TeamView]
PatchOrganizationTeam managementExecutor[usecase.PatchOrganizationTeamInput, usecase.TeamView]
DeleteOrganizationTeam managementExecutor[usecase.DeleteOrganizationTeamInput, usecase.ManagementEmpty]
AssignMemberTeam managementExecutor[usecase.AssignMemberTeamInput, usecase.MemberView]
}func NewManagementHandler
func NewManagementHandler() *ManagementHandlerNewManagementHandler creates stubs without runtime providers or persistence dependencies.
func (*ManagementHandler) RegisterHuma
func (h *ManagementHandler) RegisterHuma(api huma.API)RegisterHuma publishes intended success schemas, validation and explicit 501 responses.
type MemberInput
MemberInput contains the member request parameters.
type MemberInput struct {
OrganizationInput
MemberID string `path:"memberId" minLength:"1"`
}type OrgAuthVerifyBodyDto
OrgAuthVerifyBodyDto is the standard successful response envelope.
type OrgAuthVerifyBodyDto struct {
Message string `json:"message"`
Data OrgAuthVerifyDataDto `json:"data"`
StatusCode int `json:"status_code"`
}type OrgAuthVerifyDataDto
OrgAuthVerifyDataDto contains the verified identity, membership and profile.
type OrgAuthVerifyDataDto struct {
Identity OrgAuthVerifyIdentityDto `json:"identity"`
Member OrgAuthVerifyMemberDto `json:"member"`
Organization OrgAuthVerifyOrganizationDto `json:"organization"`
}type OrgAuthVerifyIdentityDto
OrgAuthVerifyIdentityDto exposes safe identity account details.
type OrgAuthVerifyIdentityDto struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
Status string `json:"status"`
EmailVerified bool `json:"email_verified"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}type OrgAuthVerifyMemberDto
OrgAuthVerifyMemberDto describes the caller's membership in the organization.
type OrgAuthVerifyMemberDto struct {
ID string `json:"id"`
UserID string `json:"user_id"`
OrganizationID string `json:"organization_id"`
TeamID *string `json:"team_id,omitempty"`
Role string `json:"role"`
Status string `json:"status"`
IsActiveContext bool `json:"is_active_context"`
JoinedAt time.Time `json:"joined_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}type OrgAuthVerifyOrganizationDto
OrgAuthVerifyOrganizationDto describes the verified organization's profile.
type OrgAuthVerifyOrganizationDto struct {
Type *string `json:"type"`
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
Phone string `json:"phone"`
Email string `json:"email"`
Address string `json:"address"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}type OrgAuthVerifyReqDto
OrgAuthVerifyReqDto carries credentials and organization context inferred from the request.
type OrgAuthVerifyReqDto struct {
AuthenticatedInput
// contains filtered or unexported fields
}func (*OrgAuthVerifyReqDto) Resolve
func (input *OrgAuthVerifyReqDto) Resolve(ctx huma.Context) []errorResolve infers optional organization context without requiring client selectors.
type OrgAuthVerifyResDto
OrgAuthVerifyResDto wraps the organization verification response.
type OrgAuthVerifyResDto struct {
Body OrgAuthVerifyBodyDto
}type OrgLoginReqDto
OrgLoginReqDto contains the credentials used to authenticate an organization member.
type OrgLoginReqDto struct {
Body struct {
Email string `json:"email" format:"email" maxLength:"255" example:"member@example.com" doc:"Registered email address."`
Password string `json:"password" minLength:"1" maxLength:"128" writeOnly:"true" example:"ExamplePassword123!" doc:"Current account password."`
}
}type OrgLoginResDto
OrgLoginResDto contains the credentials issued for an organization member session.
type OrgLoginResDto struct {
Body types.SuccessResponse[identitypublic.TokenPair]
}type OrgProfileBodyDto
OrgProfileBodyDto wraps the organization profile in the standard success response.
type OrgProfileBodyDto struct {
Message string `json:"message"`
StatusCode int `json:"status_code"`
Data OrgProfileDto `json:"data"`
}type OrgProfileDetailsDto
OrgProfileDetailsDto contains the caller's membership in the selected organization.
type OrgProfileDetailsDto struct {
ID string `json:"id"`
UserID string `json:"user_id"`
OrganizationID string `json:"organization_id"`
TeamID *string `json:"team_id,omitempty"`
Role string `json:"role"`
Status string `json:"status" enum:"active,inactive,pending"`
IsActiveContext bool `json:"is_active_context"`
JoinedAt time.Time `json:"joined_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}type OrgProfileDto
OrgProfileDto extends identity details with membership and organization authorization.
type OrgProfileDto struct {
identitypublic.Account
Profile OrgProfileDetailsDto `json:"profile"`
Organization organizationpublic.Organization `json:"organization"`
Roles []OrgProfileRoleDto `json:"roles" nullable:"false"`
Permissions []authorizationpublic.EffectivePermission `json:"permissions" nullable:"false" doc:"Effective own/any decisions after role grants and direct overrides."`
}type OrgProfileGetReqDto
OrgProfileGetReqDto carries credentials and organization context inferred from the request.
type OrgProfileGetReqDto struct {
AuthenticatedInput
// contains filtered or unexported fields
}func (*OrgProfileGetReqDto) Resolve
func (input *OrgProfileGetReqDto) Resolve(ctx huma.Context) []errorResolve infers optional organization context without requiring client selectors.
type OrgProfileGetResDto
OrgProfileGetResDto contains the member's profile and effective scoped grants.
type OrgProfileGetResDto struct {
CacheControl string `header:"Cache-Control"`
Body OrgProfileBodyDto
}type OrgProfileRoleDto
OrgProfileRoleDto contains assigned role metadata without permission grants.
type OrgProfileRoleDto struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
Protected bool `json:"protected"`
Version int64 `json:"version"`
}type OrganizationDoctorsBody
OrganizationDoctorsBody wraps affiliation results in the standard success envelope.
type OrganizationDoctorsBody struct {
Message string `json:"message"`
StatusCode int `json:"status_code"`
Data []usecase.OrganizationDoctorItem `json:"data" nullable:"false"`
Pagination types.Pagination `json:"pagination"`
}type OrganizationDoctorsInput
OrganizationDoctorsInput carries the organization scope, search, and pagination.
type OrganizationDoctorsInput struct {
AuthenticatedInput
PaginationInput
OrganizationID string `path:"organizationId" format:"uuid"`
Search string `query:"search" maxLength:"255"`
Status string `query:"status" enum:"active,inactive"`
}type OrganizationDoctorsOutput
OrganizationDoctorsOutput is the organization doctor-list HTTP response.
type OrganizationDoctorsOutput struct{ Body OrganizationDoctorsBody }type OrganizationInput
OrganizationInput contains the organization request parameters.
type OrganizationInput struct {
AuthenticatedInput
OrganizationID string `path:"organizationId" minLength:"1"`
}type OrganizationListInput
OrganizationListInput contains the organization list request parameters.
type OrganizationListInput struct {
OrganizationInput
PaginationInput
}type PaginationInput
PaginationInput contains the shared cursor and bounded page-size parameters.
type PaginationInput struct {
Limit int `query:"limit" minimum:"1" maximum:"100" default:"20"`
Cursor string `query:"cursor" doc:"Opaque cursor from the preceding response."`
}type PatchAffiliationHTTPInput
PatchAffiliationHTTPInput updates a doctor affiliation within an organization.
type PatchAffiliationHTTPInput struct {
DoctorInput
Body usecase.PatchDoctorAffiliationParams
}type PatchPortalOrganizationHTTPInput
PatchPortalOrganizationHTTPInput edits supplied organization details.
type PatchPortalOrganizationHTTPInput struct {
OrganizationInput
Body usecase.PatchPortalOrganizationParams
RawBody []byte
}func (*PatchPortalOrganizationHTTPInput) Resolve
func (i *PatchPortalOrganizationHTTPInput) Resolve(_ huma.Context) []errorResolve checks nonempty patches and optional contact-email syntax.
type PatchTeamHTTPInput
PatchTeamHTTPInput edits supplied team fields.
type PatchTeamHTTPInput struct {
TeamHTTPInput
Body usecase.PatchOrganizationTeamParams
RawBody []byte
}func (*PatchTeamHTTPInput) Resolve
func (i *PatchTeamHTTPInput) Resolve(_ huma.Context) []errorResolve rejects patches with no editable team field.
type PortalHandler
PortalHandler wires documentation-first routes to their individual TODO use cases.
type PortalHandler struct {
ListMyOrganizations *usecase.ListMyOrganizationsUseCase
ViewOrganization *usecase.ViewOrganizationUseCase
ListOrganizationMembers *usecase.ListOrganizationMembersUseCase
ViewOrganizationMember *usecase.ViewOrganizationMemberUseCase
AddOrganizationMember *usecase.AddOrganizationMemberUseCase
EditOrganizationMember *usecase.EditOrganizationMemberUseCase
AssignOrganizationMemberRole *usecase.AssignOrganizationMemberRoleUseCase
ListOrganizationDoctors *usecase.ListOrganizationDoctorsUseCase
ViewOrganizationDoctor *usecase.ViewOrganizationDoctorUseCase
ViewOrganizationSubscription *usecase.ViewOrganizationSubscriptionUseCase
ListOrganizationInvoices *usecase.ListOrganizationInvoicesUseCase
InviteOrganizationDoctor *usecase.InviteOrganizationDoctorUseCase
ListDoctorInvitations *usecase.ListDoctorInvitationsUseCase
RevokeDoctorInvitation *usecase.RevokeDoctorInvitationUseCase
ListIncomingDoctorJoinRequests *usecase.ListIncomingDoctorJoinRequestsUseCase
AcceptDoctorJoinRequest *usecase.AcceptDoctorJoinRequestUseCase
RejectDoctorJoinRequest *usecase.RejectDoctorJoinRequestUseCase
}func NewPortalHandler
func NewPortalHandler() *PortalHandlerNewPortalHandler creates the documentation-first portal handler.
func (*PortalHandler) RegisterHuma
func (h *PortalHandler) RegisterHuma(api huma.API)RegisterHuma registers validated API contracts with documented authentication and 501 responses.
type PortalOutput
PortalOutput wraps the intended success body documented alongside the actual 501 response.
type PortalOutput[T any] struct{ Body T }type ProfileHandler
ProfileHandler delivers the current organization member's profile.
type ProfileHandler struct {
// contains filtered or unexported fields
}func NewProfileHandler
func NewProfileHandler(getProfile *usecase.GetOrganizationProfileUseCase) *ProfileHandlerNewProfileHandler constructs the organization profile HTTP handler.
func (*ProfileHandler) RegisterHuma
func (h *ProfileHandler) RegisterHuma(api huma.API)RegisterHuma registers the authenticated self-service organization profile route.
type RequestInput
RequestInput identifies a join request within an organization.
type RequestInput struct {
AuthenticatedInput
OrganizationID string `path:"organizationId" minLength:"1"`
RequestID string `path:"requestId" minLength:"1"`
}type TeamHTTPInput
TeamHTTPInput scopes a team identifier to its owning organization.
type TeamHTTPInput struct {
OrganizationInput
TeamID string `path:"teamId" minLength:"1" pattern:"\\S"`
}Generated by gomarkdoc