project

package
v0.0.0-...-46aa976 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntegrationModel

type IntegrationModel struct {
	IsEnabled bool              `json:"is_enabled"`
	Type      string            `json:"type"`
	Details   map[string]string `json:"details"`
}

type ProjectModel

type ProjectModel struct {
	ID           string
	Name         string
	Description  sql.NullString
	IsSelected   bool
	Integrations sql.NullString
}

func CreateModel

func CreateModel(entity entity.Project) (ProjectModel, error)

func (ProjectModel) ToEntity

func (pm ProjectModel) ToEntity() (entity.Project, error)

type RepoImpl

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

func New

func New(db *sql.DB) *RepoImpl

func (*RepoImpl) Delete

func (ri *RepoImpl) Delete(ctx context.Context, projectID string) error

func (*RepoImpl) GetAll

func (ri *RepoImpl) GetAll(ctx context.Context) (entity.Projects, error)

func (*RepoImpl) GetByID

func (ri *RepoImpl) GetByID(ctx context.Context, id string) (entity.Project, error)

func (*RepoImpl) GetSelectedProject

func (ri *RepoImpl) GetSelectedProject(ctx context.Context) (entity.Project, error)

func (*RepoImpl) Insert

func (ri *RepoImpl) Insert(ctx context.Context, projectEntity entity.Project) error

func (*RepoImpl) SetSelectedProject

func (ri *RepoImpl) SetSelectedProject(ctx context.Context, id string) (err error)

func (*RepoImpl) Update

func (ri *RepoImpl) Update(ctx context.Context, projectEntity entity.Project) error

Jump to

Keyboard shortcuts

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