Documentation
¶
Index ¶
- Variables
- type CreateDocumentationInput
- type Documentation
- type GlobalDocumentation
- type PostgresRepository
- func (r *PostgresRepository) CreateDocumentation(ctx context.Context, doc Documentation) error
- func (r *PostgresRepository) CreateGlobalDocumentation(ctx context.Context, doc GlobalDocumentation) error
- func (r *PostgresRepository) GetDocumentation(ctx context.Context, mrn string) ([]Documentation, error)
- func (r *PostgresRepository) GetGlobalDocumentation(ctx context.Context, source string) (string, error)
- type Repository
- type Service
- type ServiceOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("asset not found") ErrConflict = errors.New("asset already exists") )
Functions ¶
This section is empty.
Types ¶
type Documentation ¶
type GlobalDocumentation ¶
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
func (*PostgresRepository) CreateDocumentation ¶
func (r *PostgresRepository) CreateDocumentation(ctx context.Context, doc Documentation) error
func (*PostgresRepository) CreateGlobalDocumentation ¶
func (r *PostgresRepository) CreateGlobalDocumentation(ctx context.Context, doc GlobalDocumentation) error
func (*PostgresRepository) GetDocumentation ¶
func (r *PostgresRepository) GetDocumentation(ctx context.Context, mrn string) ([]Documentation, error)
func (*PostgresRepository) GetGlobalDocumentation ¶
type Repository ¶
type Repository interface {
GetDocumentation(ctx context.Context, mrn string) ([]Documentation, error)
CreateDocumentation(ctx context.Context, doc Documentation) error
CreateGlobalDocumentation(ctx context.Context, doc GlobalDocumentation) error
GetGlobalDocumentation(ctx context.Context, source string) (string, error)
}
func NewPostgresRepository ¶
func NewPostgresRepository(db *pgxpool.Pool) Repository
type Service ¶
type Service interface {
Get(ctx context.Context, mrn string) ([]Documentation, error)
Create(ctx context.Context, doc Documentation) error
CreateGlobal(ctx context.Context, doc GlobalDocumentation) error
CombineDocumentation(ctx context.Context, docs []Documentation) ([]Documentation, error)
}
func NewService ¶
func NewService(repo Repository, opts ...ServiceOption) Service
type ServiceOption ¶
type ServiceOption func(*service)
Click to show internal directories.
Click to hide internal directories.