Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Dialogue ¶
type Dialogue struct {
ID ulid.ULID `gorm:"type:char(26);not null;primaryKey"`
PageID ulid.ULID `gorm:"type:char(26);not null"`
Dialogue string `gorm:"type:text;not null"`
Top float64 `gorm:"type:float;not null"`
Bottom float64 `gorm:"type:float;not null"`
Left float64 `gorm:"type:float;not null"`
Right float64 `gorm:"type:float;not null"`
Page Page `gorm:"foreignKey:PageID;references:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
}
type DialoguePageRepository ¶
type DialogueRepository ¶
type DialogueRepository interface {
InsertDialogue(ctx context.Context, id ulid.ULID, pageID ulid.ULID, dialogue string, top float64, bottom float64, left float64, right float64) (*Dialogue, error)
UpdateDialogue(ctx context.Context, id ulid.ULID, dialogue string, top float64, bottom float64, left float64, right float64) (*Dialogue, error)
DeleteDialogue(ctx context.Context, id ulid.ULID) error
}
type Line ¶
type Line struct {
ID ulid.ULID `gorm:"type:char(26);not null;primaryKey"`
PageID ulid.ULID `gorm:"type:char(26);not null"`
PenSize int `gorm:"type:int;not null"`
Points Points `gorm:"type:text;not null"`
Page Page `gorm:"foreignKey:PageID;references:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
}
type LinePageRepository ¶
type LineRepository ¶
type Page ¶
type Page struct {
ID ulid.ULID `gorm:"type:char(26);not null;primaryKey"`
ProjectID ulid.ULID `gorm:"type:char(26);not null"`
Index int `gorm:"type:int;not null"`
Height int `gorm:"type:int;not null"`
Width int `gorm:"type:int;not null"`
Project Project `gorm:"foreignKey:ProjectID;references:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
}
type PageRepository ¶
type PageRepository interface {
SelectProjectPages(ctx context.Context, projectID ulid.ULID) ([]*Page, error)
InsertPage(ctx context.Context, id ulid.ULID, projectID ulid.ULID, height int, width int) (*Page, error)
SelectPage(ctx context.Context, id ulid.ULID) (*Page, error)
UpdateIndex(ctx context.Context, id ulid.ULID, operation string) (*Page, error)
}
type Project ¶
type Project struct {
ID ulid.ULID `gorm:"type:char(26);not null;primaryKey"`
Name string `gorm:"type:varchar(255);not null"`
Thumbnail string `gorm:"type:varchar(255);not null"`
CreatedAt time.Time `gorm:"type:DATETIME;not null;default:CURRENT_TIMESTAMP"`
UpdatedAt time.Time `gorm:"type:DATETIME;not null;default:CURRENT_TIMESTAMP"`
}
type ProjectPageRepository ¶
type ProjectRepository ¶
type ProjectRepository interface {
SelectProjects(ctx context.Context) ([]*Project, error)
InsertProject(ctx context.Context, id ulid.ULID, name string, thumbnail string) (*Project, error)
SelectProject(ctx context.Context, id ulid.ULID) (*Project, error)
UpdateProject(ctx context.Context, id ulid.ULID, name string) (*Project, error)
DeleteProject(ctx context.Context, id ulid.ULID) error
}
Click to show internal directories.
Click to hide internal directories.