Documentation ¶
Index ¶
- Constants
- Variables
- type OrganizationDBClient
- func (s *OrganizationDBClient) Create(ctx context.Context, organization model.Organization) (*model.Organization, error)
- func (s *OrganizationDBClient) Delete(ctx context.Context, oin string) error
- func (s *OrganizationDBClient) Get(ctx context.Context, oin string) (*model.Organization, error)
- func (s *OrganizationDBClient) GetHealthCheck() healthcheck.Result
- func (s *OrganizationDBClient) List(ctx context.Context) (*[]model.Organization, error)
- func (s *OrganizationDBClient) Update(ctx context.Context, organization model.Organization, oin string) error
- type OrganizationRepository
Constants ¶
View Source
const ( SQL_CREATE_ORGANIZATION = `` /* 137-byte string literal not displayed */ SQL_LIST_ORGANIZATIONS = ` SELECT * FROM scheme.organization ` SQL_READ_ORGANIZATION = ` SELECT * FROM scheme.organization WHERE oin = $1 ` SQL_UPDATE_ORGANIZATION = `` /* 142-byte string literal not displayed */ SQL_DELETE_ORGANIZATION = ` DELETE FROM scheme.organization WHERE oin = $1 ` SQL_HEALTHCHECK_ORGANIZATION = ` SELECT 1 ` )
Variables ¶
View Source
var ErrOrganizationNotFound = errors.New("organization does not exist")
Functions ¶
This section is empty.
Types ¶
type OrganizationDBClient ¶
type OrganizationDBClient struct {
// contains filtered or unexported fields
}
func NewOrganizationDBClient ¶
func (*OrganizationDBClient) Create ¶
func (s *OrganizationDBClient) Create(ctx context.Context, organization model.Organization) (*model.Organization, error)
func (*OrganizationDBClient) Delete ¶
func (s *OrganizationDBClient) Delete(ctx context.Context, oin string) error
func (*OrganizationDBClient) Get ¶
func (s *OrganizationDBClient) Get(ctx context.Context, oin string) (*model.Organization, error)
func (*OrganizationDBClient) GetHealthCheck ¶
func (s *OrganizationDBClient) GetHealthCheck() healthcheck.Result
func (*OrganizationDBClient) List ¶
func (s *OrganizationDBClient) List(ctx context.Context) (*[]model.Organization, error)
func (*OrganizationDBClient) Update ¶
func (s *OrganizationDBClient) Update(ctx context.Context, organization model.Organization, oin string) error
type OrganizationRepository ¶
type OrganizationRepository interface { Create(ctx context.Context, newOrganizationSetting model.Organization) (*model.Organization, error) List(ctx context.Context) (*[]model.Organization, error) Get(ctx context.Context, id string) (*model.Organization, error) Update(ctx context.Context, newOrganizationSetting model.Organization, oin string) error Delete(ctx context.Context, oin string) error healthcheck.Checker }
Click to show internal directories.
Click to hide internal directories.