Documentation ¶
Index ¶
- Variables
- type Category
- type CategoryList
- type Circle
- type CircleImage
- type CircleList
- type CircleType
- type DBRepository
- type GetCircle
- type GetCircleInput
- type InputCircleImage
- type InputCircleType
- type ListCategoryInput
- type ListCircleInput
- type PostCircle
- type PostCircleImages
- type PostCircleInput
- type PostCirclesCircleTypes
- type ShinkanDatabase
- func (db *ShinkanDatabase) GetCircle(input GetCircleInput) (*model.GetCircle, error)
- func (db *ShinkanDatabase) ListCategory(input ListCategoryInput) ([]*model.Category, error)
- func (db *ShinkanDatabase) ListCircle(input ListCircleInput) ([]*model.Circle, error)
- func (db *ShinkanDatabase) PostCircle(input PostCircleInput) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidInput = errors.New("invalid input")
)
View Source
var (
ErrNotFound = "sql: no rows in result set"
)
Functions ¶
This section is empty.
Types ¶
type CategoryList ¶
type CategoryList []Category
type Circle ¶
type Circle struct { ID int `db:"id"` Name string `db:"name"` About string `db:"about"` CatchCopy string `db:"catch_copy"` Cost *string `db:"cost"` Location *string `db:"location"` WorkTime *string `db:"work_time"` MembersNumber *string `db:"members_number"` Description string `db:"description"` CategoryID int `db:"circle_category_id"` Email string `db:"email"` Twitter string `db:"twitter"` URL string `db:"url"` EyeCatch string `db:"eyecatch"` TypeID *int `db:"type_id"` TypeName *string `db:"type_name"` UpdatedAt string `db:"updated_at"` }
type CircleImage ¶
type CircleImage struct {
URL string `db:"url"`
}
type CircleList ¶
type CircleList []Circle
type CircleType ¶
type DBRepository ¶
type DBRepository interface { // api ListCategory(input ListCategoryInput) ([]*model.Category, error) GetCircle(input GetCircleInput) (*model.GetCircle, error) ListCircle(input ListCircleInput) ([]*model.Circle, error) // admin PostCircle(input PostCircleInput) error }
type GetCircle ¶
type GetCircle struct { ID int `db:"id"` Name string `db:"name"` About string `db:"about"` CatchCopy string `db:"catch_copy"` Cost *string `db:"cost"` Location *string `db:"location"` WorkTime *string `db:"work_time"` MembersNumber *string `db:"members_number"` Description string `db:"description"` CategoryID int `db:"circle_category_id"` Email string `db:"email"` Twitter string `db:"twitter"` URL string `db:"url"` EyeCatch string `db:"eyecatch"` UpdatedAt string `db:"updated_at"` }
type GetCircleInput ¶
type GetCircleInput struct {
ID int
}
type InputCircleImage ¶
type InputCircleImage struct {
URL string
}
type InputCircleType ¶
type InputCircleType struct {
ID int
}
type ListCircleInput ¶
type ListCircleInput struct {
CategoryID []int
}
type PostCircle ¶
type PostCircle struct { ID int `db:"id,primarykey,autoincrement"` Name string `db:"name"` About string `db:"about"` CatchCopy string `db:"catch_copy"` Description string `db:"description"` CategoryID int `db:"circle_category_id"` Email string `db:"email"` Twitter string `db:"twitter"` URL string `db:"url"` EyeCatch string `db:"eyecatch"` }
type PostCircleImages ¶
type PostCircleInput ¶
type PostCircleInput struct { Name string About string CatchCopy string Description string EyeCatch string Email string Twitter string URL string Images []InputCircleImage Types []InputCircleType CategoryID int }
admin
type PostCirclesCircleTypes ¶
type ShinkanDatabase ¶
func NewDatabase ¶
func NewDatabase(user, password, host, port, database string) *ShinkanDatabase
func (*ShinkanDatabase) GetCircle ¶
func (db *ShinkanDatabase) GetCircle(input GetCircleInput) (*model.GetCircle, error)
func (*ShinkanDatabase) ListCategory ¶
func (db *ShinkanDatabase) ListCategory(input ListCategoryInput) ([]*model.Category, error)
func (*ShinkanDatabase) ListCircle ¶
func (db *ShinkanDatabase) ListCircle(input ListCircleInput) ([]*model.Circle, error)
func (*ShinkanDatabase) PostCircle ¶
func (db *ShinkanDatabase) PostCircle(input PostCircleInput) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.