Documentation
¶
Index ¶
Constants ¶
View Source
const Megabyte = 20
Variables ¶
View Source
var CreateScript string
View Source
var ErrInvalidParameter = errors.New("invalid paramater")
View Source
var ErrNoRecord = errors.New("no record found")
View Source
var FixtureScript string
Functions ¶
Types ¶
type Clock ¶
Clock ist eine Schnittstelle, die das aktuelle Datum und die aktuelle Uhrzeit bereitstellt.
type DownloadHandler ¶
type DownloadHandler struct {
// contains filtered or unexported fields
}
type FormHandler ¶
type FormHandler struct {
// contains filtered or unexported fields
}
Form liefert eine Ansicht für die Bearbeitung eines Photos
func (FormHandler) ServeData ¶
func (h FormHandler) ServeData(fragment string, r *http.Request) webx.HandlerResult
type Repository ¶
type Repository interface {
GetPhotoById(ctx context.Context, dingId int64) ([]byte, error)
GetUrl(ctx context.Context, dingId int64) (string, error)
PhotoAktualisieren(ctx context.Context, id int64, image image.Image) error
}
func NewSqlRpository ¶
func NewSqlRpository(ctx context.Context, tm sqlx.TransactionManager, clock Clock) (Repository, error)
type SqlRepository ¶
type SqlRepository struct {
Clock Clock
Tm sqlx.TransactionManager
}
func (SqlRepository) GetPhotoById ¶
func (SqlRepository) GetUrl ¶
GetUrl liefert die URL des Photos eines Dings.
[id] ist die id eines Dings.
func (SqlRepository) PhotoAktualisieren ¶
type UploadHandler ¶
type UploadHandler struct {
// contains filtered or unexported fields
}
Upload nimmt ein neues Photo entgegen und speichert es in der Datenbank
func (UploadHandler) ProcessRequest ¶
func (h UploadHandler) ProcessRequest(fragment string, r *http.Request) webx.HandlerResult
Click to show internal directories.
Click to hide internal directories.