hub

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Integration

type Integration struct {
	ID          uint              `json:"id" gorm:"primaryKey"`
	Name        string            `json:"name" gorm:"not null"`
	Description string            `json:"description"`
	UserID      string            `json:"user_id" gorm:"index;not null"`
	Type        string            `json:"type" gorm:"not null"`
	Status      IntegrationStatus `json:"status" gorm:"default:0"`
	CreatedAt   time.Time         `json:"created_at"`
	UpdatedAt   time.Time         `json:"updated_at"`
	DeletedAt   gorm.DeletedAt    `json:"-" gorm:"index"`
}

func (Integration) TableName

func (Integration) TableName() string

type IntegrationStatus

type IntegrationStatus int
const (
	IntegrationStatusActive IntegrationStatus = iota
	IntegrationStatusInactive
	IntegrationStatusError
)

func (IntegrationStatus) String

func (i IntegrationStatus) String() string

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) CreateIntegration

func (s *Service) CreateIntegration(ctx context.Context, integration *Integration) error

func (*Service) GetIntegrations

func (s *Service) GetIntegrations(ctx context.Context, userID string) ([]*Integration, error)

func (*Service) SetDB

func (s *Service) SetDB(db *gorm.DB)

Jump to

Keyboard shortcuts

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