Documentation ¶
Index ¶
- type Client
- func (c *Client) FetchGallery(ctx context.Context, id uuid.UUID) (gallery.JSONGallery, error)
- func (c *Client) FetchShelf(ctx context.Context, id uuid.UUID) (document.JSONShelf, error)
- func (c *Client) LookupGalleryByName(ctx context.Context, name string) (uuid.UUID, bool, error)
- func (c *Client) LookupGalleryStackByName(ctx context.Context, galleryID uuid.UUID, name string) (uuid.UUID, bool, error)
- func (c *Client) LookupShelfByName(ctx context.Context, name string) (uuid.UUID, bool, error)
- func (c *Client) ReplaceDocument(ctx context.Context, shelfID, documentID uuid.UUID, r io.Reader) (document.Document, error)
- func (c *Client) ReplaceImage(ctx context.Context, galleryID, stackID uuid.UUID, r io.Reader) (gallery.Stack, error)
- func (c *Client) UploadDocument(ctx context.Context, shelfID uuid.UUID, r io.Reader, ...) (document.Document, error)
- func (c *Client) UploadImage(ctx context.Context, galleryID uuid.UUID, r io.Reader, name, disk, path string) (gallery.Stack, error)
- type Server
- func (s *Server) FetchGallery(ctx context.Context, id *protocommon.UUID) (*protomedia.Gallery, error)
- func (s *Server) FetchShelf(ctx context.Context, id *protocommon.UUID) (*protomedia.Shelf, error)
- func (s *Server) LookupGalleryByName(ctx context.Context, req *protocommon.NameLookup) (*protocommon.LookupResp, error)
- func (s *Server) LookupGalleryStackByName(ctx context.Context, req *protomedia.LookupGalleryStackByNameReq) (*protocommon.LookupResp, error)
- func (s *Server) LookupShelfByName(ctx context.Context, req *protocommon.NameLookup) (*protocommon.LookupResp, error)
- func (s *Server) Register(reg grpc.ServiceRegistrar)
- func (s *Server) ReplaceDocument(stream protomedia.MediaService_ReplaceDocumentServer) error
- func (s *Server) ReplaceImage(stream protomedia.MediaService_ReplaceImageServer) error
- func (s *Server) UploadDocument(stream protomedia.MediaService_UploadDocumentServer) error
- func (s *Server) UploadImage(stream protomedia.MediaService_UploadImageServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the media gRPC client.
func NewClient ¶
func NewClient(conn grpc.ClientConnInterface) *Client
NewClient returns the media gRPC client.
func (*Client) FetchGallery ¶
func (*Client) FetchShelf ¶
func (*Client) LookupGalleryByName ¶
func (*Client) LookupGalleryStackByName ¶
func (*Client) LookupShelfByName ¶
LookupShelfByName looks up the UUID of a shelf by its name.
func (*Client) ReplaceDocument ¶
func (c *Client) ReplaceDocument(ctx context.Context, shelfID, documentID uuid.UUID, r io.Reader) (document.Document, error)
ReplaceDocument replaces a document within a shelf.
func (*Client) ReplaceImage ¶
type Server ¶
type Server struct { protomedia.UnimplementedMediaServiceServer // contains filtered or unexported fields }
Server is the media gRPC server.
func NewServer ¶
func NewServer( shelfs document.Repository, docLookup *document.Lookup, galleries gallery.Repository, galleryLookup *gallery.Lookup, storage media.Storage, ) *Server
NewServer returns the media gRPC server.
func (*Server) FetchGallery ¶
func (s *Server) FetchGallery(ctx context.Context, id *protocommon.UUID) (*protomedia.Gallery, error)
func (*Server) FetchShelf ¶
func (s *Server) FetchShelf(ctx context.Context, id *protocommon.UUID) (*protomedia.Shelf, error)
func (*Server) LookupGalleryByName ¶
func (s *Server) LookupGalleryByName(ctx context.Context, req *protocommon.NameLookup) (*protocommon.LookupResp, error)
func (*Server) LookupGalleryStackByName ¶
func (s *Server) LookupGalleryStackByName(ctx context.Context, req *protomedia.LookupGalleryStackByNameReq) (*protocommon.LookupResp, error)
func (*Server) LookupShelfByName ¶
func (s *Server) LookupShelfByName(ctx context.Context, req *protocommon.NameLookup) (*protocommon.LookupResp, error)
LookupShelfByName looks up the UUID of a shelf by its name.
func (*Server) Register ¶
func (s *Server) Register(reg grpc.ServiceRegistrar)
Register registers the server into a ServiceRegistrar.
func (*Server) ReplaceDocument ¶
func (s *Server) ReplaceDocument(stream protomedia.MediaService_ReplaceDocumentServer) error
ReplaceDocument replaces a document within a shelf.
func (*Server) ReplaceImage ¶
func (s *Server) ReplaceImage(stream protomedia.MediaService_ReplaceImageServer) error
func (*Server) UploadDocument ¶
func (s *Server) UploadDocument(stream protomedia.MediaService_UploadDocumentServer) error
UploadDocument uploads a document to a shelf.
func (*Server) UploadImage ¶
func (s *Server) UploadImage(stream protomedia.MediaService_UploadImageServer) error
Click to show internal directories.
Click to hide internal directories.