Versions in this module Expand all Collapse all v0 v0.1.0 Jun 25, 2026 Changes in this version + var DefaultConversions = []Conversion + type Conversion struct + Fit bool + Height int + Name string + Width int + type Media struct + Collection string + Conversions map[string]string + CreatedAt time.Time + Custom map[string]any + Disk string + ID string + Mime string + ModelID string + ModelType string + Name string + Path string + Size int64 + type Service struct + func FromKernel(k *togo.Kernel) (*Service, bool) + func (s *Service) Attach(ctx context.Context, modelType, modelID, collection, name string, data []byte) (*Media, error) + func (s *Service) Bytes(m *Media, conversion string) ([]byte, error) + func (s *Service) Delete(ctx context.Context, id string) error + func (s *Service) Find(ctx context.Context, id string) (*Media, error) + func (s *Service) Get(ctx context.Context, modelType, modelID, collection string) ([]*Media, error) + func (s *Service) SetConversions(c []Conversion) + func (s *Service) URL(m *Media, conversion string) string + type Store interface + Delete func(ctx context.Context, id string) error + Get func(ctx context.Context, id string) (*Media, error) + List func(ctx context.Context, modelType, modelID, collection string) ([]*Media, error) + Save func(ctx context.Context, m *Media) error