Documentation
¶
Index ¶
- Constants
- func Attach(mux goahttp.Muxer, service *Service)
- type BlobStore
- type FSBlobStore
- func (fbs *FSBlobStore) Exists(ctx context.Context, u *url.URL) (bool, error)
- func (fbs *FSBlobStore) Read(ctx context.Context, u *url.URL) (io.ReadCloser, error)
- func (fbs *FSBlobStore) ReadAt(ctx context.Context, u *url.URL) (ReaderAtCloser, int64, error)
- func (fbs *FSBlobStore) Write(ctx context.Context, pathname string, src io.Reader, contentType string) (io.WriteCloser, *url.URL, error)
- type GCSBlobStore
- func (gbs *GCSBlobStore) Exists(ctx context.Context, u *url.URL) (bool, error)
- func (gbs *GCSBlobStore) Read(ctx context.Context, u *url.URL) (io.ReadCloser, error)
- func (gbs *GCSBlobStore) ReadAt(ctx context.Context, u *url.URL) (ReaderAtCloser, int64, error)
- func (gbs *GCSBlobStore) Write(ctx context.Context, subpath string, src io.Reader, contentType string) (io.WriteCloser, *url.URL, error)
- type ReaderAtCloser
- type Service
- func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
- func (s *Service) ListAssets(ctx context.Context, payload *gen.ListAssetsPayload) (*gen.ListAssetsResult, error)
- func (s *Service) ServeImage(ctx context.Context, payload *gen.ServeImageForm) (*gen.ServeImageResult, io.ReadCloser, error)
- func (s *Service) ServeOpenAPIv3(ctx context.Context, payload *gen.ServeOpenAPIv3Form) (*gen.ServeOpenAPIv3Result, io.ReadCloser, error)
- func (s *Service) UploadFunctions(ctx context.Context, payload *gen.UploadFunctionsForm, reader io.ReadCloser) (*gen.UploadFunctionsResult, error)
- func (s *Service) UploadImage(ctx context.Context, payload *gen.UploadImageForm, reader io.ReadCloser) (res *gen.UploadImageResult, err error)
- func (s *Service) UploadOpenAPIv3(ctx context.Context, payload *gen.UploadOpenAPIv3Form, reader io.ReadCloser) (*gen.UploadOpenAPIv3Result, error)
Constants ¶
View Source
const ( MaxFileSizeFunctions = 15 * mib MaxFileSizeOpenAPI = 10 * mib MaxFileSizeImage = 4 * mib )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlobStore ¶
type BlobStore interface {
Exists(ctx context.Context, objectURL *url.URL) (bool, error)
Read(ctx context.Context, objectURL *url.URL) (rdr io.ReadCloser, err error)
ReadAt(ctx context.Context, objectURL *url.URL) (rdr ReaderAtCloser, size int64, err error)
Write(ctx context.Context, urlpath string, src io.Reader, contentType string) (io.WriteCloser, *url.URL, error)
}
type FSBlobStore ¶
type FSBlobStore struct {
Root *os.Root
Logger *slog.Logger
// contains filtered or unexported fields
}
func NewFSBlobStore ¶
func NewFSBlobStore(logger *slog.Logger, root *os.Root) *FSBlobStore
func (*FSBlobStore) Read ¶
func (fbs *FSBlobStore) Read(ctx context.Context, u *url.URL) (io.ReadCloser, error)
func (*FSBlobStore) ReadAt ¶
func (fbs *FSBlobStore) ReadAt(ctx context.Context, u *url.URL) (ReaderAtCloser, int64, error)
type GCSBlobStore ¶
type GCSBlobStore struct {
// contains filtered or unexported fields
}
func NewGCSBlobStore ¶
func (*GCSBlobStore) Read ¶
func (gbs *GCSBlobStore) Read(ctx context.Context, u *url.URL) (io.ReadCloser, error)
func (*GCSBlobStore) ReadAt ¶
func (gbs *GCSBlobStore) ReadAt(ctx context.Context, u *url.URL) (ReaderAtCloser, int64, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) APIKeyAuth ¶
func (*Service) ListAssets ¶
func (s *Service) ListAssets(ctx context.Context, payload *gen.ListAssetsPayload) (*gen.ListAssetsResult, error)
func (*Service) ServeImage ¶
func (s *Service) ServeImage(ctx context.Context, payload *gen.ServeImageForm) (*gen.ServeImageResult, io.ReadCloser, error)
func (*Service) ServeOpenAPIv3 ¶
func (s *Service) ServeOpenAPIv3(ctx context.Context, payload *gen.ServeOpenAPIv3Form) (*gen.ServeOpenAPIv3Result, io.ReadCloser, error)
func (*Service) UploadFunctions ¶
func (s *Service) UploadFunctions(ctx context.Context, payload *gen.UploadFunctionsForm, reader io.ReadCloser) (*gen.UploadFunctionsResult, error)
func (*Service) UploadImage ¶
func (s *Service) UploadImage(ctx context.Context, payload *gen.UploadImageForm, reader io.ReadCloser) (res *gen.UploadImageResult, err error)
func (*Service) UploadOpenAPIv3 ¶
func (s *Service) UploadOpenAPIv3(ctx context.Context, payload *gen.UploadOpenAPIv3Form, reader io.ReadCloser) (*gen.UploadOpenAPIv3Result, error)
Click to show internal directories.
Click to hide internal directories.