Documentation ¶
Index ¶
- Constants
- Variables
- func StripURLPrefix(in string) string
- type File
- func (*File) Descriptor() ([]byte, []int)deprecated
- func (x *File) GetContentType() string
- func (x *File) GetData() []byte
- func (x *File) GetDelete() bool
- func (x *File) GetExtension() string
- func (x *File) GetHash() string
- func (x *File) GetUrl() string
- func (x *File) IsImage() bool
- func (x *File) MatchFileExt() error
- func (x *File) Optimize(ctx context.Context) error
- func (*File) ProtoMessage()
- func (x *File) ProtoReflect() protoreflect.Message
- func (x *File) Reset()
- func (x *File) Scan(value any) error
- func (x *File) String() string
- func (x *File) Upload(ctx context.Context, st storage.IStorage, prefix FilePrefix, fileName string) error
- func (m *File) Validate() error
- func (m *File) ValidateAll() error
- func (x *File) Value() (driver.Value, error)
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)deprecated
- func (x *FileInfo) GetContentType() string
- func (x *FileInfo) GetLastModified() *timestamp.Timestamp
- func (x *FileInfo) GetName() string
- func (x *FileInfo) GetSize() int64
- func (*FileInfo) ProtoMessage()
- func (x *FileInfo) ProtoReflect() protoreflect.Message
- func (x *FileInfo) Reset()
- func (x *FileInfo) String() string
- func (m *FileInfo) Validate() error
- func (m *FileInfo) ValidateAll() error
- type FileInfoMultiError
- type FileInfoValidationError
- type FileMultiError
- type FilePrefix
- type FileValidationError
Constants ¶
const FilestoreURLPrefix = "/api/filestore/"
Variables ¶
var File_resources_filestore_file_proto protoreflect.FileDescriptor
Functions ¶
func StripURLPrefix ¶
Types ¶
type File ¶
type File struct { Url *string `protobuf:"bytes,1,opt,name=url,proto3,oneof" json:"url,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Delete *bool `protobuf:"varint,3,opt,name=delete,proto3,oneof" json:"delete,omitempty"` ContentType *string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3,oneof" json:"content_type,omitempty"` Extension *string `protobuf:"bytes,5,opt,name=extension,proto3,oneof" json:"extension,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetContentType ¶
func (*File) GetExtension ¶
func (*File) MatchFileExt ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
func (*File) Validate ¶
Validate checks the field values on File with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*File) ValidateAll ¶
ValidateAll checks the field values on File with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FileMultiError, or nil if none found.
type FileInfo ¶
type FileInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` LastModified *timestamp.Timestamp `protobuf:"bytes,2,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) Descriptor
deprecated
func (*FileInfo) GetContentType ¶
func (*FileInfo) GetLastModified ¶
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) ProtoReflect ¶
func (x *FileInfo) ProtoReflect() protoreflect.Message
func (*FileInfo) Validate ¶
Validate checks the field values on FileInfo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FileInfo) ValidateAll ¶
ValidateAll checks the field values on FileInfo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FileInfoMultiError, or nil if none found.
type FileInfoMultiError ¶
type FileInfoMultiError []error
FileInfoMultiError is an error wrapping multiple validation errors returned by FileInfo.ValidateAll() if the designated constraints aren't met.
func (FileInfoMultiError) AllErrors ¶
func (m FileInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FileInfoMultiError) Error ¶
func (m FileInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FileInfoValidationError ¶
type FileInfoValidationError struct {
// contains filtered or unexported fields
}
FileInfoValidationError is the validation error returned by FileInfo.Validate if the designated constraints aren't met.
func (FileInfoValidationError) Cause ¶
func (e FileInfoValidationError) Cause() error
Cause function returns cause value.
func (FileInfoValidationError) Error ¶
func (e FileInfoValidationError) Error() string
Error satisfies the builtin error interface
func (FileInfoValidationError) ErrorName ¶
func (e FileInfoValidationError) ErrorName() string
ErrorName returns error name.
func (FileInfoValidationError) Field ¶
func (e FileInfoValidationError) Field() string
Field function returns field value.
func (FileInfoValidationError) Key ¶
func (e FileInfoValidationError) Key() bool
Key function returns key value.
func (FileInfoValidationError) Reason ¶
func (e FileInfoValidationError) Reason() string
Reason function returns reason value.
type FileMultiError ¶
type FileMultiError []error
FileMultiError is an error wrapping multiple validation errors returned by File.ValidateAll() if the designated constraints aren't met.
func (FileMultiError) AllErrors ¶
func (m FileMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FileMultiError) Error ¶
func (m FileMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FilePrefix ¶
type FilePrefix = string
const ( Avatars FilePrefix = "avatars" JobLogos FilePrefix = "joblogos" MugShots FilePrefix = "mugshots" JobAssets FilePrefix = "jobassets" )
type FileValidationError ¶
type FileValidationError struct {
// contains filtered or unexported fields
}
FileValidationError is the validation error returned by File.Validate if the designated constraints aren't met.
func (FileValidationError) Cause ¶
func (e FileValidationError) Cause() error
Cause function returns cause value.
func (FileValidationError) Error ¶
func (e FileValidationError) Error() string
Error satisfies the builtin error interface
func (FileValidationError) ErrorName ¶
func (e FileValidationError) ErrorName() string
ErrorName returns error name.
func (FileValidationError) Field ¶
func (e FileValidationError) Field() string
Field function returns field value.
func (FileValidationError) Key ¶
func (e FileValidationError) Key() bool
Key function returns key value.
func (FileValidationError) Reason ¶
func (e FileValidationError) Reason() string
Reason function returns reason value.