Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UpdateError update error UpdateError errors.TraceableType = "AccountUpdateError" // GetError when account cannot be retrieved GetError errors.TraceableType = "AccountGetError" // CreationError is thrown when creation of the account is not satisfactory CreationError errors.TraceableType = "AccountCreationError" // DeleteError when account cannot be retrieved DeleteError errors.TraceableType = "AccountDeleteError" // ListError when account cannot be found ListError errors.TraceableType = "AccountDeleteError" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountCursorList ¶
type Repository ¶
type Repository interface { Create(c context.Context, id t.String, data *Account) error Get(c context.Context, id t.String) (*Account, error) Update(c context.Context, id t.String, data *Account) error FindAll(c context.Context, startAt string, limit int64) (*AccountCursorList, error) Delete(c context.Context, id t.String) error }
AccountRepository is the interface to store the data (it will need to be implemented)
type Service ¶
type Service interface { Create(c context.Context, data *Account) (t.String, error) Get(c context.Context, accountID t.String) (*Account, error) Update(c context.Context, accountID t.String, data *Account) error Delete(c context.Context, accountID t.String) error List(c context.Context, startAt string, limit int64) (*AccountCursorList, error) }
Service is the inteface that exposes the services
Click to show internal directories.
Click to hide internal directories.