Skip to content

http ​

go
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 ​

AddMemberInput contains the add member request parameters.

go
type AddMemberInput struct {
    OrganizationInput
    Body usecase.AddMemberParams
}

func (*AddMemberInput) Resolve ​

go
func (i *AddMemberInput) Resolve(_ huma.Context) []error

Resolve 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.

go
type AssignMemberTeamHTTPInput struct {
    MemberInput
    Body usecase.AssignMemberTeamParams
}

type AssignRoleInput ​

AssignRoleInput contains the assign role request parameters.

go
type AssignRoleInput struct {
    MemberInput
    Body usecase.AssignMemberRoleParams
}

type AuditDetailInput ​

AuditDetailInput identifies an event within the requested service-owned history.

go
type AuditDetailInput struct {
    AuditScopeInput
    EventID string `path:"eventId" format:"uuid"`
}

type AuditHandler ​

AuditHandler serves this service's authenticated audit list and detail endpoints.

go
type AuditHandler struct {
    // contains filtered or unexported fields
}

func NewAuditHandler ​

go
func NewAuditHandler(identity types.IIdentityService, lister audit.EventLister, reader audit.EventReader) *AuditHandler

NewAuditHandler constructs the service-owned history HTTP adapter.

func (*AuditHandler) RegisterHuma ​

go
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.

go
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.

go
type AuditScopeInput struct {
    Authorization  string `header:"Authorization" hidden:"true"`
    OrganizationID string `path:"organizationId" format:"uuid"`
}

type AuthHandler ​

AuthHandler delivers organization authentication operations.

go
type AuthHandler struct {
    // contains filtered or unexported fields
}

func NewAuthHandler ​

go
func NewAuthHandler(verifyAuth *usecase.VerifyAuthUseCase, login *usecase.LoginUseCase) *AuthHandler

NewAuthHandler constructs organization authentication HTTP handlers.

func (*AuthHandler) RegisterHuma ​

go
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.

go
type AuthenticatedInput struct {
    Authorization string `header:"Authorization" hidden:"true"`
}

type AuthorizationAssignRoleInput ​

AuthorizationAssignRoleInput contains validated HTTP parameters for the scoped authorization operation.

go
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.

go
type AuthorizationAssignmentInput struct {
    AuthorizationMemberInput
    RoleID string `path:"roleId" format:"uuid"`
}

type AuthorizationCapabilities ​

AuthorizationCapabilities groups individually injectable authorization operation interfaces.

go
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.

go
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.

go
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.

go
type AuthorizationHandler struct {
    // contains filtered or unexported fields
}

func NewAuthorizationHandler ​

go
func NewAuthorizationHandler(identity types.IIdentityService, caps AuthorizationCapabilities) *AuthorizationHandler

NewAuthorizationHandler constructs authenticated authorization HTTP handlers.

func (*AuthorizationHandler) RegisterHuma ​

go
func (h *AuthorizationHandler) RegisterHuma(api huma.API)

RegisterHuma registers authenticated Organization authorization management endpoints.

func (*AuthorizationHandler) SetAuditAccounts ​

go
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.

go
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.

go
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.

go
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.

go
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.

go
type AuthorizationRoleInput struct {
    AuthorizationScopeInput
    RoleID string `path:"roleId" minLength:"1"`
}

type AuthorizationScopeInput ​

AuthorizationScopeInput contains validated HTTP parameters for the scoped authorization operation.

go
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.

go
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.

go
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.

go
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.

go
type DoctorInput struct {
    OrganizationInput
    DoctorID string `path:"doctorId" minLength:"1"`
}

type EditMemberInput ​

EditMemberInput contains the edit member request parameters.

go
type EditMemberInput struct {
    MemberInput
    Body usecase.EditMemberParams
}

type Handler ​

Handler wraps use cases for HTTP delivery.

go
type Handler struct {
    // contains filtered or unexported fields
}

func NewHandler ​

go
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

NewHandler creates a new HTTP handler instance.

func (*Handler) CreateOrganization ​

go
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 ​

go
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 ​

go
func (h *Handler) GetOrganization(ctx context.Context, w http.ResponseWriter, id string)

GetOrganization writes the organization identified by id.

func (*Handler) InviteMember ​

go
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 ​

go
func (h *Handler) ListMembers(ctx context.Context, w http.ResponseWriter, orgID string)

ListMembers writes the memberships of the specified organization.

func (*Handler) ListOrganizations ​

go
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 ​

go
func (h *Handler) ListTeams(ctx context.Context, w http.ResponseWriter, orgID string)

ListTeams writes the teams belonging to the specified organization.

func (*Handler) RegisterRoutes ​

go
func (h *Handler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers preserved legacy operations. Portal contracts use Huma.

func (*Handler) RemoveMember ​

go
func (h *Handler) RemoveMember(ctx context.Context, w http.ResponseWriter, r *http.Request)

RemoveMember handles removal of an unprotected organization membership.

func (*Handler) SetActiveContext ​

go
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 ​

go
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.

go
type InvitationInput struct {
    OrganizationInput
    InvitationID string `path:"invitationId" minLength:"1"`
}

type InviteDoctorInput ​

InviteDoctorInput contains the invite doctor request parameters.

go
type InviteDoctorInput struct {
    OrganizationInput
    Body usecase.InviteDoctorParams
}

type ListInput ​

ListInput contains the list request parameters.

go
type ListInput struct {
    AuthenticatedInput
    PaginationInput
}

type ManagementHandler ​

ManagementHandler wires documentation-first operations to individual stub use cases.

go
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 ​

go
func NewManagementHandler() *ManagementHandler

NewManagementHandler creates stubs without runtime providers or persistence dependencies.

func (*ManagementHandler) RegisterHuma ​

go
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.

go
type MemberInput struct {
    OrganizationInput
    MemberID string `path:"memberId" minLength:"1"`
}

type OrgAuthVerifyBodyDto ​

OrgAuthVerifyBodyDto is the standard successful response envelope.

go
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.

go
type OrgAuthVerifyDataDto struct {
    Identity     OrgAuthVerifyIdentityDto     `json:"identity"`
    Member       OrgAuthVerifyMemberDto       `json:"member"`
    Organization OrgAuthVerifyOrganizationDto `json:"organization"`
}

type OrgAuthVerifyIdentityDto ​

OrgAuthVerifyIdentityDto exposes safe identity account details.

go
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.

go
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.

go
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.

go
type OrgAuthVerifyReqDto struct {
    AuthenticatedInput
    // contains filtered or unexported fields
}

func (*OrgAuthVerifyReqDto) Resolve ​

go
func (input *OrgAuthVerifyReqDto) Resolve(ctx huma.Context) []error

Resolve infers optional organization context without requiring client selectors.

type OrgAuthVerifyResDto ​

OrgAuthVerifyResDto wraps the organization verification response.

go
type OrgAuthVerifyResDto struct {
    Body OrgAuthVerifyBodyDto
}

type OrgLoginReqDto ​

OrgLoginReqDto contains the credentials used to authenticate an organization member.

go
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.

go
type OrgLoginResDto struct {
    Body types.SuccessResponse[identitypublic.TokenPair]
}

type OrgProfileBodyDto ​

OrgProfileBodyDto wraps the organization profile in the standard success response.

go
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.

go
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.

go
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.

go
type OrgProfileGetReqDto struct {
    AuthenticatedInput
    // contains filtered or unexported fields
}

func (*OrgProfileGetReqDto) Resolve ​

go
func (input *OrgProfileGetReqDto) Resolve(ctx huma.Context) []error

Resolve infers optional organization context without requiring client selectors.

type OrgProfileGetResDto ​

OrgProfileGetResDto contains the member's profile and effective scoped grants.

go
type OrgProfileGetResDto struct {
    CacheControl string `header:"Cache-Control"`
    Body         OrgProfileBodyDto
}

type OrgProfileRoleDto ​

OrgProfileRoleDto contains assigned role metadata without permission grants.

go
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.

go
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.

go
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.

go
type OrganizationDoctorsOutput struct{ Body OrganizationDoctorsBody }

type OrganizationInput ​

OrganizationInput contains the organization request parameters.

go
type OrganizationInput struct {
    AuthenticatedInput
    OrganizationID string `path:"organizationId" minLength:"1"`
}

type OrganizationListInput ​

OrganizationListInput contains the organization list request parameters.

go
type OrganizationListInput struct {
    OrganizationInput
    PaginationInput
}

type PaginationInput ​

PaginationInput contains the shared cursor and bounded page-size parameters.

go
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.

go
type PatchAffiliationHTTPInput struct {
    DoctorInput
    Body usecase.PatchDoctorAffiliationParams
}

type PatchPortalOrganizationHTTPInput ​

PatchPortalOrganizationHTTPInput edits supplied organization details.

go
type PatchPortalOrganizationHTTPInput struct {
    OrganizationInput
    Body    usecase.PatchPortalOrganizationParams
    RawBody []byte
}

func (*PatchPortalOrganizationHTTPInput) Resolve ​

go
func (i *PatchPortalOrganizationHTTPInput) Resolve(_ huma.Context) []error

Resolve checks nonempty patches and optional contact-email syntax.

type PatchTeamHTTPInput ​

PatchTeamHTTPInput edits supplied team fields.

go
type PatchTeamHTTPInput struct {
    TeamHTTPInput
    Body    usecase.PatchOrganizationTeamParams
    RawBody []byte
}

func (*PatchTeamHTTPInput) Resolve ​

go
func (i *PatchTeamHTTPInput) Resolve(_ huma.Context) []error

Resolve rejects patches with no editable team field.

type PortalHandler ​

PortalHandler wires documentation-first routes to their individual TODO use cases.

go
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 ​

go
func NewPortalHandler() *PortalHandler

NewPortalHandler creates the documentation-first portal handler.

func (*PortalHandler) RegisterHuma ​

go
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.

go
type PortalOutput[T any] struct{ Body T }

type ProfileHandler ​

ProfileHandler delivers the current organization member's profile.

go
type ProfileHandler struct {
    // contains filtered or unexported fields
}

func NewProfileHandler ​

go
func NewProfileHandler(getProfile *usecase.GetOrganizationProfileUseCase) *ProfileHandler

NewProfileHandler constructs the organization profile HTTP handler.

func (*ProfileHandler) RegisterHuma ​

go
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.

go
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.

go
type TeamHTTPInput struct {
    OrganizationInput
    TeamID string `path:"teamId" minLength:"1" pattern:"\\S"`
}

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.