* Add org methods to org service and store * Fix name of fake * Remove unused fake * Add xorm tags and half of a test * Add cmment for clarifying missing part of test * Add some comments about future refactors * Rename test * Add test for update org address
23 lines
870 B
Go
23 lines
870 B
Go
package org
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Service interface {
|
|
GetIDForNewUser(context.Context, GetOrgIDForNewUserCommand) (int64, error)
|
|
InsertOrgUser(context.Context, *OrgUser) (int64, error)
|
|
DeleteUserFromAll(context.Context, int64) error
|
|
GetUserOrgList(context.Context, *GetUserOrgListQuery) ([]*UserOrgDTO, error)
|
|
UpdateOrg(context.Context, *UpdateOrgCommand) error
|
|
Search(context.Context, *SearchOrgsQuery) ([]*OrgDTO, error)
|
|
GetByID(context.Context, *GetOrgByIdQuery) (*Org, error)
|
|
GetByNameHandler(context.Context, *GetOrgByNameQuery) (*Org, error)
|
|
GetByName(string) (*Org, error)
|
|
CreateWithMember(string, int64) (*Org, error)
|
|
Create(context.Context, *CreateOrgCommand) (*Org, error)
|
|
UpdateAddress(context.Context, *UpdateOrgAddressCommand) error
|
|
Delete(context.Context, *DeleteOrgCommand) error
|
|
GetOrCreate(context.Context, string) (int64, error)
|
|
}
|