refactor: storage interface
This commit is contained in:
@@ -37,16 +37,16 @@ type UIStorage interface {
|
||||
// otherwise callback func accepts loaded [report.Report].
|
||||
LoadReport(client.GameID, uint, func(report.Report, error))
|
||||
|
||||
// PutReport stores given [report.Report] for a given [model.GameID] and turn number at the filesystem asynchronously.
|
||||
// SaveReport stores given [report.Report] for a given [model.GameID] and turn number at the filesystem asynchronously.
|
||||
// I/O or encoding error may occur, it that case callback func will be called with non-nil error.
|
||||
PutReport(client.GameID, uint, report.Report, func(error))
|
||||
SaveReport(client.GameID, uint, report.Report, func(error))
|
||||
|
||||
// LoadOrder loads a [order.Order] for a given [model.GameID] and turn number from filesystem asynchronously.
|
||||
// Passed callback func will will accept non-nil error in case of I/O or decoding errors occuried,
|
||||
// otherwise callback func accepts loaded [order.Order].
|
||||
LoadOrder(client.GameID, uint, func(order.Order, error))
|
||||
|
||||
// PutOrder stores given [order.Order] for a given [model.GameID] and turn number at the filesystem asynchronously.
|
||||
// SaveOrder stores given [order.Order] for a given [model.GameID] and turn number at the filesystem asynchronously.
|
||||
// I/O or encoding error may occur, it that case callback func will be called with non-nil error.
|
||||
PutOrder(client.GameID, uint, order.Order, func(error))
|
||||
SaveOrder(client.GameID, uint, order.Order, func(error))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user