You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package domain
|
|
|
|
|
|
|
|
import "errors"
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrNoUserAgent = errors.New("that useragent does not exist")
|
|
|
|
)
|
|
|
|
|
|
|
|
type UserAgentRepository interface{
|
|
|
|
Create(useragent UserAgent) (*UserAgent, error)
|
|
|
|
All() ([]UserAgent, error)
|
|
|
|
GetByName(name string) (*UserAgent, error)
|
|
|
|
Update(id int64, useragent UserAgent) (*UserAgent, error)
|
|
|
|
Delete(id int64) error
|
|
|
|
}
|
|
|
|
|
|
|
|
type FileDataRepository interface {
|
|
|
|
Create(filename string, user_agent_label string) (BogInFile, error)
|
|
|
|
Open(filename string, user_agent_label string) (BogOutFile, error)
|
|
|
|
Delete(filename string, user_agent_label string)
|
|
|
|
}
|