docs: Remove redundant implementations and comments
This commit is contained in:
parent
ec1e0c742a
commit
9b7a6b1fa3
67 changed files with 2 additions and 87 deletions
|
|
@ -75,7 +75,7 @@ graph TD
|
||||||
|
|
||||||
You will need:
|
You will need:
|
||||||
* **Docker & Docker Compose** (Required for Database)
|
* **Docker & Docker Compose** (Required for Database)
|
||||||
* **Go 1.23+** (Required for Backend)
|
* **Go 1.25+** (Required for Backend)
|
||||||
* **Node.js 20+ & pnpm** (Required for Frontend)
|
* **Node.js 20+ & pnpm** (Required for Frontend)
|
||||||
* **Make** (Required for running commands)
|
* **Make** (Required for running commands)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Builder stage
|
# Builder stage
|
||||||
FROM golang:1.23.7-alpine3.20 AS builder
|
FROM golang:1.25-alpine3.20 AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,6 @@ func (h *Handler) ListDocuments(c *gin.Context) {
|
||||||
c.JSON(http.StatusOK, response)
|
c.JSON(http.StatusOK, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteDocument deletes a document
|
|
||||||
// @Summary Delete document
|
// @Summary Delete document
|
||||||
// @Description Deletes a document and its associated file
|
// @Description Deletes a document and its associated file
|
||||||
// @Tags Documents
|
// @Tags Documents
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,6 @@ func (h *AccountHandler) UpdateAccount(c *gin.Context) {
|
||||||
response.Success(c, http.StatusOK, account)
|
response.Success(c, http.StatusOK, account)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteAccount deletes an account
|
|
||||||
func (h *AccountHandler) DeleteAccount(c *gin.Context) {
|
func (h *AccountHandler) DeleteAccount(c *gin.Context) {
|
||||||
reqCtx := auth.GetRequestContext(c)
|
reqCtx := auth.GetRequestContext(c)
|
||||||
if reqCtx == nil {
|
if reqCtx == nil {
|
||||||
|
|
@ -244,7 +243,6 @@ func (h *AccountHandler) UpdateAccountLastLogin(c *gin.Context) {
|
||||||
response.Success(c, http.StatusOK, account)
|
response.Success(c, http.StatusOK, account)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckAccountPermission checks account permissions
|
|
||||||
func (h *AccountHandler) CheckAccountPermission(c *gin.Context) {
|
func (h *AccountHandler) CheckAccountPermission(c *gin.Context) {
|
||||||
reqCtx := auth.GetRequestContext(c)
|
reqCtx := auth.GetRequestContext(c)
|
||||||
if reqCtx == nil {
|
if reqCtx == nil {
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,6 @@ func (h *MemberHandler) GetProfile(c *gin.Context) {
|
||||||
response.Success(c, http.StatusOK, profile)
|
response.Success(c, http.StatusOK, profile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteMember deletes an organization member.
|
|
||||||
// @Summary Delete organization member
|
// @Summary Delete organization member
|
||||||
// @Description Removes a member from the organization (deletes from both Stytch and internal database). Only admins can delete members.
|
// @Description Removes a member from the organization (deletes from both Stytch and internal database). Only admins can delete members.
|
||||||
// @Tags auth
|
// @Tags auth
|
||||||
|
|
@ -287,7 +286,6 @@ func (h *MemberHandler) DeleteMember(c *gin.Context) {
|
||||||
response.Success(c, http.StatusNoContent, nil)
|
response.Success(c, http.StatusNoContent, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckEmail checks if an email exists in the system
|
|
||||||
// @Summary Check if email exists
|
// @Summary Check if email exists
|
||||||
// @Description Checks if an email exists in any organization. Returns 200 OK (empty response) if exists, 404 Not Found if doesn't exist. This is a public endpoint used during login flow.
|
// @Description Checks if an email exists in any organization. Returns 200 OK (empty response) if exists, 404 Not Found if doesn't exist. This is a public endpoint used during login flow.
|
||||||
// @Tags auth
|
// @Tags auth
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type Provider struct {
|
||||||
container *dig.Container
|
container *dig.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewProvider creates a new organization API provider
|
|
||||||
func NewProvider(container *dig.Container) *Provider {
|
func NewProvider(container *dig.Container) *Provider {
|
||||||
return &Provider{
|
return &Provider{
|
||||||
container: container,
|
container: container,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ type moduleRoutes struct {
|
||||||
CognitiveRoutes *cognitiveAPI.Routes
|
CognitiveRoutes *cognitiveAPI.Routes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init initializes the API by setting up dependencies and registering routes
|
|
||||||
// 1. Sets up all module dependencies
|
// 1. Sets up all module dependencies
|
||||||
// 2. Registers API routes and handlers
|
// 2. Registers API routes and handlers
|
||||||
// 3. Registers tools routes and handlers
|
// 3. Registers tools routes and handlers
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ type Handler struct {
|
||||||
service auth.RBACService
|
service auth.RBACService
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewHandler creates a new RBAC handler
|
|
||||||
func NewHandler(service auth.RBACService) *Handler {
|
func NewHandler(service auth.RBACService) *Handler {
|
||||||
return &Handler{
|
return &Handler{
|
||||||
service: service,
|
service: service,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type Provider struct {
|
||||||
container *dig.Container
|
container *dig.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewProvider creates a new RBAC provider
|
|
||||||
func NewProvider(container *dig.Container) *Provider {
|
func NewProvider(container *dig.Container) *Provider {
|
||||||
return &Provider{
|
return &Provider{
|
||||||
container: container,
|
container: container,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ type Routes struct {
|
||||||
handler *Handler
|
handler *Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRoutes creates a new Routes instance
|
|
||||||
func NewRoutes(handler *Handler) *Routes {
|
func NewRoutes(handler *Handler) *Routes {
|
||||||
return &Routes{
|
return &Routes{
|
||||||
handler: handler,
|
handler: handler,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import (
|
||||||
// Module handles dependency injection for billing services
|
// Module handles dependency injection for billing services
|
||||||
type Module struct{}
|
type Module struct{}
|
||||||
|
|
||||||
// NewModule creates a new services module
|
|
||||||
func NewModule() *Module {
|
func NewModule() *Module {
|
||||||
return &Module{}
|
return &Module{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ type billingService struct {
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBillingService creates a new billing service
|
|
||||||
func NewBillingService(
|
func NewBillingService(
|
||||||
repo domain.SubscriptionRepository,
|
repo domain.SubscriptionRepository,
|
||||||
orgAdapter domain.OrganizationAdapter,
|
orgAdapter domain.OrganizationAdapter,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"go.uber.org/dig"
|
"go.uber.org/dig"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the billing module.
|
|
||||||
//
|
//
|
||||||
// The billing module handles subscription lifecycle management with Polar.sh:
|
// The billing module handles subscription lifecycle management with Polar.sh:
|
||||||
// - Webhook processing for subscription events
|
// - Webhook processing for subscription events
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ type StatusProviderAdapter struct {
|
||||||
service services.BillingService
|
service services.BillingService
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewStatusProviderAdapter creates a new StatusProviderAdapter.
|
|
||||||
func NewStatusProviderAdapter(service services.BillingService) paywall.SubscriptionStatusProvider {
|
func NewStatusProviderAdapter(service services.BillingService) paywall.SubscriptionStatusProvider {
|
||||||
return &StatusProviderAdapter{service: service}
|
return &StatusProviderAdapter{service: service}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ type polarAdapter struct {
|
||||||
client *polarpkg.Client
|
client *polarpkg.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPolarAdapter creates a new Polar API adapter
|
|
||||||
func NewPolarAdapter(client *polarpkg.Client) *polarAdapter {
|
func NewPolarAdapter(client *polarpkg.Client) *polarAdapter {
|
||||||
return &polarAdapter{
|
return &polarAdapter{
|
||||||
client: client,
|
client: client,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type organizationAdapter struct {
|
||||||
orgStore adapters.OrganizationStore
|
orgStore adapters.OrganizationStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOrganizationAdapter creates a new organization adapter
|
|
||||||
func NewOrganizationAdapter(orgStore adapters.OrganizationStore) domain.OrganizationAdapter {
|
func NewOrganizationAdapter(orgStore adapters.OrganizationStore) domain.OrganizationAdapter {
|
||||||
return &organizationAdapter{
|
return &organizationAdapter{
|
||||||
orgStore: orgStore,
|
orgStore: orgStore,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ type subscriptionRepository struct {
|
||||||
store adapters.SubscriptionStore
|
store adapters.SubscriptionStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSubscriptionRepository creates a new subscription repository
|
|
||||||
func NewSubscriptionRepository(store adapters.SubscriptionStore) domain.SubscriptionRepository {
|
func NewSubscriptionRepository(store adapters.SubscriptionStore) domain.SubscriptionRepository {
|
||||||
return &subscriptionRepository{
|
return &subscriptionRepository{
|
||||||
store: store,
|
store: store,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ type documentListener struct {
|
||||||
embeddingService EmbeddingService
|
embeddingService EmbeddingService
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentListener creates a new document listener
|
|
||||||
func NewDocumentListener(
|
func NewDocumentListener(
|
||||||
embeddingService EmbeddingService,
|
embeddingService EmbeddingService,
|
||||||
) DocumentListener {
|
) DocumentListener {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ type embeddingService struct {
|
||||||
textVectorizer domain.TextVectorizer
|
textVectorizer domain.TextVectorizer
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEmbeddingService creates a new embedding service
|
|
||||||
func NewEmbeddingService(
|
func NewEmbeddingService(
|
||||||
embeddingRepo domain.EmbeddingRepository,
|
embeddingRepo domain.EmbeddingRepository,
|
||||||
textVectorizer domain.TextVectorizer,
|
textVectorizer domain.TextVectorizer,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ type ragService struct {
|
||||||
assistantProvider domain.AssistantProvider
|
assistantProvider domain.AssistantProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRAGService creates a new RAG service
|
|
||||||
func NewRAGService(
|
func NewRAGService(
|
||||||
chatRepo domain.ChatRepository,
|
chatRepo domain.ChatRepository,
|
||||||
embeddingRepo domain.EmbeddingRepository,
|
embeddingRepo domain.EmbeddingRepository,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import (
|
||||||
"github.com/moasq/go-b2b-starter/pkg/eventbus"
|
"github.com/moasq/go-b2b-starter/pkg/eventbus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the cognitive module
|
|
||||||
func Init(container *dig.Container) error {
|
func Init(container *dig.Container) error {
|
||||||
module := cognitive.NewModule(container)
|
module := cognitive.NewModule(container)
|
||||||
if err := module.RegisterDependencies(); err != nil {
|
if err := module.RegisterDependencies(); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ type ChatSession struct {
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the chat session's database ID
|
|
||||||
func (s *ChatSession) GetID() int32 {
|
func (s *ChatSession) GetID() int32 {
|
||||||
return s.ID
|
return s.ID
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +68,6 @@ type ChatMessage struct {
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the chat message's database ID
|
|
||||||
func (m *ChatMessage) GetID() int32 {
|
func (m *ChatMessage) GetID() int32 {
|
||||||
return m.ID
|
return m.ID
|
||||||
}
|
}
|
||||||
|
|
@ -88,12 +86,10 @@ func (m *ChatMessage) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsUserMessage checks if the message is from the user
|
|
||||||
func (m *ChatMessage) IsUserMessage() bool {
|
func (m *ChatMessage) IsUserMessage() bool {
|
||||||
return m.Role == ChatRoleUser
|
return m.Role == ChatRoleUser
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsAssistantMessage checks if the message is from the assistant
|
|
||||||
func (m *ChatMessage) IsAssistantMessage() bool {
|
func (m *ChatMessage) IsAssistantMessage() bool {
|
||||||
return m.Role == ChatRoleAssistant
|
return m.Role == ChatRoleAssistant
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type openAITextVectorizer struct {
|
||||||
llmClient llmdomain.LLMClient
|
llmClient llmdomain.LLMClient
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewTextVectorizer creates a new TextVectorizer implementation
|
|
||||||
func NewTextVectorizer(llmClient llmdomain.LLMClient) domain.TextVectorizer {
|
func NewTextVectorizer(llmClient llmdomain.LLMClient) domain.TextVectorizer {
|
||||||
return &openAITextVectorizer{llmClient: llmClient}
|
return &openAITextVectorizer{llmClient: llmClient}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type chatRepository struct {
|
||||||
store adapters.ChatStore
|
store adapters.ChatStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewChatRepository creates a new chat repository
|
|
||||||
func NewChatRepository(store adapters.ChatStore) domain.ChatRepository {
|
func NewChatRepository(store adapters.ChatStore) domain.ChatRepository {
|
||||||
return &chatRepository{store: store}
|
return &chatRepository{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ type embeddingRepository struct {
|
||||||
store adapters.EmbeddingStore
|
store adapters.EmbeddingStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEmbeddingRepository creates a new embedding repository
|
|
||||||
func NewEmbeddingRepository(store adapters.EmbeddingStore) domain.EmbeddingRepository {
|
func NewEmbeddingRepository(store adapters.EmbeddingStore) domain.EmbeddingRepository {
|
||||||
return &embeddingRepository{store: store}
|
return &embeddingRepository{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ type Module struct {
|
||||||
container *dig.Container
|
container *dig.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewModule creates a new cognitive module
|
|
||||||
func NewModule(container *dig.Container) *Module {
|
func NewModule(container *dig.Container) *Module {
|
||||||
return &Module{
|
return &Module{
|
||||||
container: container,
|
container: container,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ type documentService struct {
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentService creates a new document service
|
|
||||||
func NewDocumentService(
|
func NewDocumentService(
|
||||||
docRepo domain.DocumentRepository,
|
docRepo domain.DocumentRepository,
|
||||||
fileService filedomain.FileService,
|
fileService filedomain.FileService,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"github.com/moasq/go-b2b-starter/app/example_documents"
|
"github.com/moasq/go-b2b-starter/app/example_documents"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the documents module
|
|
||||||
func Init(container *dig.Container) error {
|
func Init(container *dig.Container) error {
|
||||||
module := documents.NewModule(container)
|
module := documents.NewModule(container)
|
||||||
return module.RegisterDependencies()
|
return module.RegisterDependencies()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ type Document struct {
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the document's database ID
|
|
||||||
func (d *Document) GetID() int32 {
|
func (d *Document) GetID() int32 {
|
||||||
return d.ID
|
return d.ID
|
||||||
}
|
}
|
||||||
|
|
@ -52,17 +51,14 @@ func (d *Document) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsProcessed checks if the document has been processed
|
|
||||||
func (d *Document) IsProcessed() bool {
|
func (d *Document) IsProcessed() bool {
|
||||||
return d.Status == DocumentStatusProcessed
|
return d.Status == DocumentStatusProcessed
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPending checks if the document is pending processing
|
|
||||||
func (d *Document) IsPending() bool {
|
func (d *Document) IsPending() bool {
|
||||||
return d.Status == DocumentStatusPending
|
return d.Status == DocumentStatusPending
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasText checks if the document has extracted text
|
|
||||||
func (d *Document) HasText() bool {
|
func (d *Document) HasText() bool {
|
||||||
return d.ExtractedText != ""
|
return d.ExtractedText != ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ type DocumentUploaded struct {
|
||||||
ExtractedText string `json:"extracted_text"`
|
ExtractedText string `json:"extracted_text"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentUploaded creates a new DocumentUploaded event
|
|
||||||
func NewDocumentUploaded(documentID, organizationID, fileAssetID int32, title, extractedText string) *DocumentUploaded {
|
func NewDocumentUploaded(documentID, organizationID, fileAssetID int32, title, extractedText string) *DocumentUploaded {
|
||||||
return &DocumentUploaded{
|
return &DocumentUploaded{
|
||||||
BaseEvent: eventbus.BaseEvent{
|
BaseEvent: eventbus.BaseEvent{
|
||||||
|
|
@ -48,7 +47,6 @@ type DocumentProcessed struct {
|
||||||
EmbeddingID int32 `json:"embedding_id"`
|
EmbeddingID int32 `json:"embedding_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentProcessed creates a new DocumentProcessed event
|
|
||||||
func NewDocumentProcessed(documentID, organizationID, embeddingID int32) *DocumentProcessed {
|
func NewDocumentProcessed(documentID, organizationID, embeddingID int32) *DocumentProcessed {
|
||||||
return &DocumentProcessed{
|
return &DocumentProcessed{
|
||||||
BaseEvent: eventbus.BaseEvent{
|
BaseEvent: eventbus.BaseEvent{
|
||||||
|
|
@ -71,7 +69,6 @@ type DocumentFailed struct {
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentFailed creates a new DocumentFailed event
|
|
||||||
func NewDocumentFailed(documentID, organizationID int32, err string) *DocumentFailed {
|
func NewDocumentFailed(documentID, organizationID int32, err string) *DocumentFailed {
|
||||||
return &DocumentFailed{
|
return &DocumentFailed{
|
||||||
BaseEvent: eventbus.BaseEvent{
|
BaseEvent: eventbus.BaseEvent{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ type documentRepository struct {
|
||||||
store adapters.DocumentStore
|
store adapters.DocumentStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentRepository creates a new document repository
|
|
||||||
func NewDocumentRepository(store adapters.DocumentStore) domain.DocumentRepository {
|
func NewDocumentRepository(store adapters.DocumentStore) domain.DocumentRepository {
|
||||||
return &documentRepository{store: store}
|
return &documentRepository{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ type Module struct {
|
||||||
container *dig.Container
|
container *dig.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewModule creates a new documents module
|
|
||||||
func NewModule(container *dig.Container) *Module {
|
func NewModule(container *dig.Container) *Module {
|
||||||
return &Module{
|
return &Module{
|
||||||
container: container,
|
container: container,
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ type memberService struct {
|
||||||
logger loggerDomain.Logger
|
logger loggerDomain.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMemberService creates a new instance of the member service.
|
|
||||||
func NewMemberService(
|
func NewMemberService(
|
||||||
authOrgRepo domain.AuthOrganizationRepository,
|
authOrgRepo domain.AuthOrganizationRepository,
|
||||||
authMemberRepo domain.AuthMemberRepository,
|
authMemberRepo domain.AuthMemberRepository,
|
||||||
|
|
@ -531,7 +530,6 @@ func (s *memberService) DeleteOrganizationMember(
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckEmailExists checks if an email exists in the system
|
|
||||||
// Returns true if email is found in any organization, false otherwise
|
// Returns true if email is found in any organization, false otherwise
|
||||||
func (s *memberService) CheckEmailExists(ctx context.Context, email string) (bool, error) {
|
func (s *memberService) CheckEmailExists(ctx context.Context, email string) (bool, error) {
|
||||||
// Validate email format
|
// Validate email format
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type organizationService struct {
|
||||||
accountRepo domain.AccountRepository
|
accountRepo domain.AccountRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOrganizationService creates a new organization service
|
|
||||||
func NewOrganizationService(orgRepo domain.OrganizationRepository, accountRepo domain.AccountRepository) OrganizationService {
|
func NewOrganizationService(orgRepo domain.OrganizationRepository, accountRepo domain.AccountRepository) OrganizationService {
|
||||||
return &organizationService{
|
return &organizationService{
|
||||||
orgRepo: orgRepo,
|
orgRepo: orgRepo,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"github.com/moasq/go-b2b-starter/app/organizations"
|
"github.com/moasq/go-b2b-starter/app/organizations"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the organizations module
|
|
||||||
func Init(container *dig.Container) error {
|
func Init(container *dig.Container) error {
|
||||||
module := organizations.NewModule(container)
|
module := organizations.NewModule(container)
|
||||||
return module.RegisterDependencies()
|
return module.RegisterDependencies()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ type OrganizationContext struct {
|
||||||
AccountRole string `json:"account_role"`
|
AccountRole string `json:"account_role"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the organization's database ID.
|
|
||||||
// Implements auth.OrganizationEntity interface.
|
// Implements auth.OrganizationEntity interface.
|
||||||
func (o *Organization) GetID() int32 {
|
func (o *Organization) GetID() int32 {
|
||||||
return o.ID
|
return o.ID
|
||||||
|
|
@ -59,7 +58,6 @@ func (o *Organization) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the account's database ID.
|
|
||||||
// Implements auth.AccountEntity interface.
|
// Implements auth.AccountEntity interface.
|
||||||
func (a *Account) GetID() int32 {
|
func (a *Account) GetID() int32 {
|
||||||
return a.ID
|
return a.ID
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ func (e *OrganizationError) Unwrap() error {
|
||||||
return e.Cause
|
return e.Cause
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOrganizationError creates a new organization error
|
|
||||||
func NewOrganizationError(errorType, message string, orgID *int32, cause error) *OrganizationError {
|
func NewOrganizationError(errorType, message string, orgID *int32, cause error) *OrganizationError {
|
||||||
return &OrganizationError{
|
return &OrganizationError{
|
||||||
Type: errorType,
|
Type: errorType,
|
||||||
|
|
@ -108,7 +107,6 @@ func (e *AccountError) Unwrap() error {
|
||||||
return e.Cause
|
return e.Cause
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewAccountError creates a new account error
|
|
||||||
func NewAccountError(errorType, message string, accountID, orgID *int32, cause error) *AccountError {
|
func NewAccountError(errorType, message string, accountID, orgID *int32, cause error) *AccountError {
|
||||||
return &AccountError{
|
return &AccountError{
|
||||||
Type: errorType,
|
Type: errorType,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ type accountRepository struct {
|
||||||
orgStore adapters.OrganizationStore
|
orgStore adapters.OrganizationStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewAccountRepository creates a new account repository
|
|
||||||
func NewAccountRepository(accountStore adapters.AccountStore, orgStore adapters.OrganizationStore) domain.AccountRepository {
|
func NewAccountRepository(accountStore adapters.AccountStore, orgStore adapters.OrganizationStore) domain.AccountRepository {
|
||||||
return &accountRepository{
|
return &accountRepository{
|
||||||
accountStore: accountStore,
|
accountStore: accountStore,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ type organizationRepository struct {
|
||||||
orgStore adapters.OrganizationStore
|
orgStore adapters.OrganizationStore
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOrganizationRepository creates a new organization repository
|
|
||||||
func NewOrganizationRepository(orgStore adapters.OrganizationStore) domain.OrganizationRepository {
|
func NewOrganizationRepository(orgStore adapters.OrganizationStore) domain.OrganizationRepository {
|
||||||
return &organizationRepository{
|
return &organizationRepository{
|
||||||
orgStore: orgStore,
|
orgStore: orgStore,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ type Module struct {
|
||||||
container *dig.Container
|
container *dig.Container
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewModule creates a new organization module
|
|
||||||
func NewModule(container *dig.Container) *Module {
|
func NewModule(container *dig.Container) *Module {
|
||||||
return &Module{
|
return &Module{
|
||||||
container: container,
|
container: container,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Execute() {
|
func Execute() {
|
||||||
// Load environment variables from app.env file
|
|
||||||
if err := godotenv.Load("app.env"); err != nil {
|
if err := godotenv.Load("app.env"); err != nil {
|
||||||
log.Printf("Warning: Error loading app.env file: %v", err)
|
log.Printf("Warning: Error loading app.env file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,6 @@ type StytchAuthAdapter struct {
|
||||||
// Ensure StytchAuthAdapter implements auth.AuthProvider.
|
// Ensure StytchAuthAdapter implements auth.AuthProvider.
|
||||||
var _ auth.AuthProvider = (*StytchAuthAdapter)(nil)
|
var _ auth.AuthProvider = (*StytchAuthAdapter)(nil)
|
||||||
|
|
||||||
// NewStytchAuthAdapter creates a new Stytch authentication adapter.
|
|
||||||
//
|
|
||||||
// It initializes the Stytch client, JWKS cache, and RBAC policy service.
|
// It initializes the Stytch client, JWKS cache, and RBAC policy service.
|
||||||
// Returns an error if configuration or client initialization fails.
|
// Returns an error if configuration or client initialization fails.
|
||||||
func NewStytchAuthAdapter(
|
func NewStytchAuthAdapter(
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ func (c *Config) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewConfigFromExisting creates a new Config from the existing stytch.Config type.
|
|
||||||
// This allows gradual migration from the old config type.
|
// This allows gradual migration from the old config type.
|
||||||
func NewConfigFromExisting(projectID, secret, env, baseURL, jwksURL string, sessionDurationMinutes int32, disableVerification bool, apiTimeout time.Duration) *Config {
|
func NewConfigFromExisting(projectID, secret, env, baseURL, jwksURL string, sessionDurationMinutes int32, disableVerification bool, apiTimeout time.Duration) *Config {
|
||||||
return &Config{
|
return &Config{
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ type serializedPublicKey struct {
|
||||||
E string `json:"e"` // Exponent (base64url encoded)
|
E string `json:"e"` // Exponent (base64url encoded)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewJWKSCache creates a new JWKS cache manager.
|
|
||||||
func NewJWKSCache(jwksURL string, redisClient redis.Client, logger logger.Logger) *JWKSCache {
|
func NewJWKSCache(jwksURL string, redisClient redis.Client, logger logger.Logger) *JWKSCache {
|
||||||
return &JWKSCache{
|
return &JWKSCache{
|
||||||
jwksURL: jwksURL,
|
jwksURL: jwksURL,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import (
|
||||||
// before signature verification.
|
// before signature verification.
|
||||||
type JWTParser struct{}
|
type JWTParser struct{}
|
||||||
|
|
||||||
// NewJWTParser creates a new JWT parser.
|
|
||||||
func NewJWTParser() *JWTParser {
|
func NewJWTParser() *JWTParser {
|
||||||
return &JWTParser{}
|
return &JWTParser{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ type MockAuthAdapter struct {
|
||||||
// Ensure MockAuthAdapter implements auth.AuthProvider.
|
// Ensure MockAuthAdapter implements auth.AuthProvider.
|
||||||
var _ auth.AuthProvider = (*MockAuthAdapter)(nil)
|
var _ auth.AuthProvider = (*MockAuthAdapter)(nil)
|
||||||
|
|
||||||
// NewMockAuthAdapter creates a new mock auth adapter for development.
|
|
||||||
func NewMockAuthAdapter(log logger.Logger) *MockAuthAdapter {
|
func NewMockAuthAdapter(log logger.Logger) *MockAuthAdapter {
|
||||||
return &MockAuthAdapter{
|
return &MockAuthAdapter{
|
||||||
logger: log,
|
logger: log,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ type RBACPolicyService struct {
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRBACPolicyService creates a new RBAC policy service.
|
|
||||||
func NewRBACPolicyService(client *b2bstytchapi.API, redisClient redis.Client, logger logger.Logger) *RBACPolicyService {
|
func NewRBACPolicyService(client *b2bstytchapi.API, redisClient redis.Client, logger logger.Logger) *RBACPolicyService {
|
||||||
return &RBACPolicyService{
|
return &RBACPolicyService{
|
||||||
client: client,
|
client: client,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ type TokenVerifier struct {
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewTokenVerifier creates a new token verifier with two-tier verification.
|
|
||||||
func NewTokenVerifier(
|
func NewTokenVerifier(
|
||||||
client *b2bstytchapi.API,
|
client *b2bstytchapi.API,
|
||||||
jwksCache *JWKSCache,
|
jwksCache *JWKSCache,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import (
|
||||||
"go.uber.org/dig"
|
"go.uber.org/dig"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the auth module and registers core dependencies.
|
|
||||||
//
|
//
|
||||||
// This sets up:
|
// This sets up:
|
||||||
// - stytch.Config
|
// - stytch.Config
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,6 @@ type Middleware struct {
|
||||||
config *MiddlewareConfig
|
config *MiddlewareConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMiddleware creates a new auth middleware instance.
|
|
||||||
//
|
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// - provider: The auth provider for token verification (e.g., Stytch adapter)
|
// - provider: The auth provider for token verification (e.g., Stytch adapter)
|
||||||
// - orgResolver: Resolves org by provider ID (optional, required for RequireOrganization)
|
// - orgResolver: Resolves org by provider ID (optional, required for RequireOrganization)
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,6 @@ type RBACService interface {
|
||||||
// defaultRBACService implements the RBACService interface
|
// defaultRBACService implements the RBACService interface
|
||||||
type defaultRBACService struct{}
|
type defaultRBACService struct{}
|
||||||
|
|
||||||
// NewRBACService creates a new RBAC service
|
|
||||||
func NewRBACService() RBACService {
|
func NewRBACService() RBACService {
|
||||||
return &defaultRBACService{}
|
return &defaultRBACService{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type embeddingStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEmbeddingStore creates a new embedding store
|
|
||||||
func NewEmbeddingStore(store sqlc.Store) adapters.EmbeddingStore {
|
func NewEmbeddingStore(store sqlc.Store) adapters.EmbeddingStore {
|
||||||
return &embeddingStore{store: store}
|
return &embeddingStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +45,6 @@ type chatStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewChatStore creates a new chat store
|
|
||||||
func NewChatStore(store sqlc.Store) adapters.ChatStore {
|
func NewChatStore(store sqlc.Store) adapters.ChatStore {
|
||||||
return &chatStore{store: store}
|
return &chatStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type documentStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDocumentStore creates a new document store
|
|
||||||
func NewDocumentStore(store sqlc.Store) adapters.DocumentStore {
|
func NewDocumentStore(store sqlc.Store) adapters.DocumentStore {
|
||||||
return &documentStore{store: store}
|
return &documentStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type fileAssetStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileAssetStore creates a new file asset store wrapper
|
|
||||||
func NewFileAssetStore(store sqlc.Store) adapters.FileAssetStore {
|
func NewFileAssetStore(store sqlc.Store) adapters.FileAssetStore {
|
||||||
return &fileAssetStore{
|
return &fileAssetStore{
|
||||||
store: store,
|
store: store,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ type organizationStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOrganizationStore creates a new organization store
|
|
||||||
func NewOrganizationStore(store sqlc.Store) adapters.OrganizationStore {
|
func NewOrganizationStore(store sqlc.Store) adapters.OrganizationStore {
|
||||||
return &organizationStore{store: store}
|
return &organizationStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +62,6 @@ type accountStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewAccountStore creates a new account store
|
|
||||||
func NewAccountStore(store sqlc.Store) adapters.AccountStore {
|
func NewAccountStore(store sqlc.Store) adapters.AccountStore {
|
||||||
return &accountStore{store: store}
|
return &accountStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type subscriptionStore struct {
|
||||||
store sqlc.Store
|
store sqlc.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSubscriptionStore creates a new subscription store
|
|
||||||
func NewSubscriptionStore(store sqlc.Store) adapters.SubscriptionStore {
|
func NewSubscriptionStore(store sqlc.Store) adapters.SubscriptionStore {
|
||||||
return &subscriptionStore{store: store}
|
return &subscriptionStore{store: store}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ type PostgresManager struct {
|
||||||
connPool *pgxpool.Pool
|
connPool *pgxpool.Pool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPostgresManager creates a new PostgresManager
|
|
||||||
func NewPostgresManager(config Config, connPool *pgxpool.Pool) *PostgresManager {
|
func NewPostgresManager(config Config, connPool *pgxpool.Pool) *PostgresManager {
|
||||||
return &PostgresManager{
|
return &PostgresManager{
|
||||||
config: config,
|
config: config,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ type SQLStore struct {
|
||||||
*Queries
|
*Queries
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewStore creates a new store
|
|
||||||
func NewStore(connPool *pgxpool.Pool) Store {
|
func NewStore(connPool *pgxpool.Pool) Store {
|
||||||
return &SQLStore{
|
return &SQLStore{
|
||||||
connPool: connPool,
|
connPool: connPool,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ type InMemoryEventBus struct {
|
||||||
closed bool
|
closed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewInMemoryEventBus creates a new in-memory event bus
|
|
||||||
func NewInMemoryEventBus(middleware ...EventMiddleware) EventBus {
|
func NewInMemoryEventBus(middleware ...EventMiddleware) EventBus {
|
||||||
return &InMemoryEventBus{
|
return &InMemoryEventBus{
|
||||||
subscribers: make(map[string][]EventHandler[Event]),
|
subscribers: make(map[string][]EventHandler[Event]),
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package cmd
|
||||||
|
|
||||||
import "go.uber.org/dig"
|
import "go.uber.org/dig"
|
||||||
|
|
||||||
// Init initializes the event bus dependencies
|
|
||||||
func Init(container *dig.Container) error {
|
func Init(container *dig.Container) error {
|
||||||
if err := ProvideEventBus(container); err != nil {
|
if err := ProvideEventBus(container); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ type r2Repository struct {
|
||||||
bucketName string
|
bucketName string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewR2Repository creates a new Cloudflare R2 repository using AWS SDK v2
|
|
||||||
func NewR2Repository(cfg *fileconfig.Config) (domain.R2Repository, error) {
|
func NewR2Repository(cfg *fileconfig.Config) (domain.R2Repository, error) {
|
||||||
// Create custom AWS config for R2
|
// Create custom AWS config for R2
|
||||||
r2Cfg, err := config.LoadDefaultConfig(context.Background(),
|
r2Cfg, err := config.LoadDefaultConfig(context.Background(),
|
||||||
|
|
@ -74,7 +73,6 @@ func (r *r2Repository) ensureBucket(ctx context.Context) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UploadObject uploads a file to R2
|
|
||||||
func (r *r2Repository) UploadObject(ctx context.Context, objectKey string, content io.Reader, size int64, contentType string) error {
|
func (r *r2Repository) UploadObject(ctx context.Context, objectKey string, content io.Reader, size int64, contentType string) error {
|
||||||
_, err := r.client.PutObject(ctx, &s3.PutObjectInput{
|
_, err := r.client.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: aws.String(r.bucketName),
|
Bucket: aws.String(r.bucketName),
|
||||||
|
|
@ -105,7 +103,6 @@ func (r *r2Repository) DownloadObject(ctx context.Context, objectKey string) (io
|
||||||
return result.Body, nil
|
return result.Body, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteObject deletes a file from R2
|
|
||||||
func (r *r2Repository) DeleteObject(ctx context.Context, objectKey string) error {
|
func (r *r2Repository) DeleteObject(ctx context.Context, objectKey string) error {
|
||||||
_, err := r.client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
_, err := r.client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
||||||
Bucket: aws.String(r.bucketName),
|
Bucket: aws.String(r.bucketName),
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ type CircuitBreaker struct {
|
||||||
resetTimeout time.Duration
|
resetTimeout time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCircuitBreaker creates a new circuit breaker
|
|
||||||
func NewCircuitBreaker(maxFailures int, resetTimeout time.Duration) *CircuitBreaker {
|
func NewCircuitBreaker(maxFailures int, resetTimeout time.Duration) *CircuitBreaker {
|
||||||
return &CircuitBreaker{
|
return &CircuitBreaker{
|
||||||
maxFailures: maxFailures,
|
maxFailures: maxFailures,
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ type Middleware struct {
|
||||||
config *MiddlewareConfig
|
config *MiddlewareConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMiddleware creates a new subscription middleware instance.
|
|
||||||
//
|
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// - provider: The subscription status provider (implements SubscriptionStatusProvider)
|
// - provider: The subscription status provider (implements SubscriptionStatusProvider)
|
||||||
// - config: Middleware configuration (optional, uses defaults if nil)
|
// - config: Middleware configuration (optional, uses defaults if nil)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ type Client struct {
|
||||||
debug bool
|
debug bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClient creates a new Polar HTTP client
|
|
||||||
func NewClient(config *Config) (*Client, error) {
|
func NewClient(config *Config) (*Client, error) {
|
||||||
if err := config.Validate(); err != nil {
|
if err := config.Validate(); err != nil {
|
||||||
return nil, fmt.Errorf("invalid configuration: %w", err)
|
return nil, fmt.Errorf("invalid configuration: %w", err)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"go.uber.org/dig"
|
"go.uber.org/dig"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init initializes the Polar package and registers dependencies
|
|
||||||
func Init(container *dig.Container) error {
|
func Init(container *dig.Container) error {
|
||||||
// Provide Polar configuration using viper
|
// Provide Polar configuration using viper
|
||||||
if err := container.Provide(func() (*polar.Config, error) {
|
if err := container.Provide(func() (*polar.Config, error) {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ type HTTPServer struct {
|
||||||
ipProtection *middleware.IPProtection
|
ipProtection *middleware.IPProtection
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewHTTPServer creates a new HTTP server instance
|
|
||||||
func NewHTTPServer(
|
func NewHTTPServer(
|
||||||
config *config.Config,
|
config *config.Config,
|
||||||
router *gin.Engine,
|
router *gin.Engine,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ type RBACPolicyService struct {
|
||||||
logger logger.Logger
|
logger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRBACPolicyService creates a new RBAC policy service
|
|
||||||
func NewRBACPolicyService(
|
func NewRBACPolicyService(
|
||||||
client *Client,
|
client *Client,
|
||||||
redisClient redis.Client,
|
redisClient redis.Client,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue