Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPortNotFound = errors.New("port not found")
Functions ¶
This section is empty.
Types ¶
type Port ¶
type Port struct { Name string `json:"name"` City string `json:"city"` Country string `json:"country"` Alias []string `json:"alias"` Regions []string `json:"regions"` Coordinates []float64 `json:"coordinates"` Province string `json:"province"` Timezone string `json:"timezone"` Unlocs []string `json:"unlocs"` Code string `json:"code"` }
type Repository ¶
type Repository interface { RepositoryReader RepositoryWriter }
Repository combines the reader and writer repository interfaces.
type RepositoryReader ¶
RepositoryReader has a list of methods that needs to be implemented by the repository for the reader interface.
type RepositoryWriter ¶
type RepositoryWriter interface { Create(ctx context.Context, p *Port) error Update(ctx context.Context, p *Port) error }
RepositoryWriter has a list of methods that needs to be implemented by the repository for the writer interface.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo Repository) *Service
func (*Service) GetPortByUnLoc ¶
type UseCase ¶
type UseCase interface { UseCaseReader UseCaseWriter }
UseCase combines the reader and writer service interfaces.
type UseCaseReader ¶
UseCaseReader has a list of methods that needs to be implemented by the service for the reader interface.
Click to show internal directories.
Click to hide internal directories.