Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Drivers = make(map[string]Driver)
Drivers is a registry of drivers
View Source
var ErrNotFound = errors.New("database: not found")
Functions ¶
Types ¶
type DB ¶
type DB interface { Close() error Migrate(ctx context.Context) error FindMigrationVersion(ctx context.Context) (int, error) FindOrganizations(ctx context.Context) ([]*Organization, error) FindOrganizationByName(ctx context.Context, name string) (*Organization, error) CreateOrganization(ctx context.Context, name string, description string) (*Organization, error) UpdateOrganization(ctx context.Context, name string, description string) (*Organization, error) DeleteOrganization(ctx context.Context, name string) error FindProjects(ctx context.Context, orgName string) ([]*Project, error) FindProjectByName(ctx context.Context, orgName string, name string) (*Project, error) CreateProject(ctx context.Context, orgID string, name string, description string) (*Project, error) UpdateProject(ctx context.Context, id string, description string) (*Project, error) DeleteProject(ctx context.Context, id string) error }
DB is the interface for a database connection
type Organization ¶
Click to show internal directories.
Click to hide internal directories.