Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentClient ¶
type DocumentClient interface { LookupShelfByName(context.Context, string) (uuid.UUID, bool, error) UploadDocument(_ context.Context, shelfID uuid.UUID, _ io.Reader, uniqueName, name, disk, path string) (document.Document, error) ReplaceDocument(_ context.Context, shelfID, documentID uuid.UUID, _ io.Reader) (document.Document, error) FetchShelf(context.Context, uuid.UUID) (document.JSONShelf, error) }
Use github.com/modernice/nice-cms/media/mediarpc.NewClient to get a gRPC DocumentClient.
type GalleryClient ¶
type GalleryClient interface { LookupGalleryByName(context.Context, string) (uuid.UUID, bool, error) LookupGalleryStackByName(_ context.Context, galleryID uuid.UUID, name string) (uuid.UUID, bool, error) UploadImage(_ context.Context, galleryID uuid.UUID, _ io.Reader, name, disk, path string) (gallery.Stack, error) ReplaceImage(_ context.Context, galleryID, stackID uuid.UUID, _ io.Reader) (gallery.Stack, error) FetchGallery(context.Context, uuid.UUID) (gallery.JSONGallery, error) }
Use github.com/modernice/nice-cms/media/mediarpc.NewClient to get a gRPC GalleryClient.
type Option ¶
type Option func(*Server)
Option is server option.
func WithDocuments ¶
func WithDocuments(client DocumentClient, routePrefix string, opts ...routes.Option) Option
WithDocuments returns an Option that adds document routes to the media server.
func WithGalleries ¶
func WithGalleries(client GalleryClient, opts ...routes.Option) Option
WithGalleries returns an Option that adds gallery routes to the media server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the media server.
Click to show internal directories.
Click to hide internal directories.