services

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL