Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ListLocal action.GTSAction = func(ctx context.Context) error { list, err := setupList(ctx) if err != nil { return err } defer func() { if err := list.shutdown(ctx); err != nil { log.Error(ctx, err) } }() mediaPath := config.GetStorageLocalBasePath() media, err := list.GetAllMediaPaths( ctx, func(m *gtsmodel.MediaAttachment) string { if m.RemoteURL == "" { return path.Join(mediaPath, m.File.Path) } return "" }) if err != nil { return err } for _, m := range media { _, _ = list.out.WriteString(m + "\n") } return nil }
View Source
var ListRemote action.GTSAction = func(ctx context.Context) error { list, err := setupList(ctx) if err != nil { return err } defer func() { if err := list.shutdown(ctx); err != nil { log.Error(ctx, err) } }() media, err := list.GetAllMediaPaths( ctx, func(m *gtsmodel.MediaAttachment) string { return m.RemoteURL }) if err != nil { return err } for _, m := range media { _, _ = list.out.WriteString(m + "\n") } return nil }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.