Documentation
¶
Index ¶
- type ConsentService
- func (s *ConsentService) CreateConsentRecord(ctx context.Context, req models.CreateConsentRequest) (*models.ConsentResponseInternalView, error)
- func (s *ConsentService) GetConsentInternalView(ctx context.Context, consentID *string, ownerID *string, appID *string) (*models.ConsentResponseInternalView, error)
- func (s *ConsentService) GetConsentPortalView(ctx context.Context, consentID string) (*models.ConsentResponsePortalView, error)
- func (s *ConsentService) RevokeConsent(ctx context.Context, consentID string, revokedBy string) error
- func (s *ConsentService) UpdateConsentStatusByPortalAction(ctx context.Context, req models.ConsentPortalActionRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsentService ¶
type ConsentService struct {
// contains filtered or unexported fields
}
ConsentService provides business logic for consent operations
func NewConsentService ¶
func NewConsentService(db *gorm.DB, consentPortalBaseURL string) (*ConsentService, error)
NewConsentService creates a new consent service
func (*ConsentService) CreateConsentRecord ¶
func (s *ConsentService) CreateConsentRecord(ctx context.Context, req models.CreateConsentRequest) (*models.ConsentResponseInternalView, error)
CreateConsentRecord creates a new consent record in the database
func (*ConsentService) GetConsentInternalView ¶
func (s *ConsentService) GetConsentInternalView(ctx context.Context, consentID *string, ownerID *string, appID *string) (*models.ConsentResponseInternalView, error)
GetConsentInternalView retrieves a consent record by ID or by (ownerID AND appID) and returns its internal view
func (*ConsentService) GetConsentPortalView ¶
func (s *ConsentService) GetConsentPortalView(ctx context.Context, consentID string) (*models.ConsentResponsePortalView, error)
GetConsentPortalView retrieves a consent record by ID and returns its portal view
func (*ConsentService) RevokeConsent ¶
func (s *ConsentService) RevokeConsent(ctx context.Context, consentID string, revokedBy string) error
RevokeConsent revokes an existing approved or pending consent
func (*ConsentService) UpdateConsentStatusByPortalAction ¶
func (s *ConsentService) UpdateConsentStatusByPortalAction(ctx context.Context, req models.ConsentPortalActionRequest) error
UpdateConsentStatusByPortalAction updates the consent status based on user action from the consent portal
Click to show internal directories.
Click to hide internal directories.