Documentation
¶
Index ¶
- func NewAttachment(ctx context.Context, attach *repo_model.Attachment, file io.Reader, size int64) (*repo_model.Attachment, error)
- func UpdateAttachment(ctx context.Context, allowedTypes string, attach *repo_model.Attachment) error
- func UploadAttachmentForIssue(ctx context.Context, file *UploaderFile, attach *repo_model.Attachment) (*repo_model.Attachment, error)
- func UploadAttachmentForRelease(ctx context.Context, file *UploaderFile, attach *repo_model.Attachment) (*repo_model.Attachment, error)
- type UploadAttachmentFunc
- type UploaderFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAttachment ¶
func NewAttachment(ctx context.Context, attach *repo_model.Attachment, file io.Reader, size int64) (*repo_model.Attachment, error)
NewAttachment creates a new attachment object, but do not verify.
func UpdateAttachment ¶
func UpdateAttachment(ctx context.Context, allowedTypes string, attach *repo_model.Attachment) error
UpdateAttachment updates an attachment, verifying that its name is among the allowed types.
func UploadAttachmentForIssue ¶
func UploadAttachmentForIssue(ctx context.Context, file *UploaderFile, attach *repo_model.Attachment) (*repo_model.Attachment, error)
func UploadAttachmentForRelease ¶
func UploadAttachmentForRelease(ctx context.Context, file *UploaderFile, attach *repo_model.Attachment) (*repo_model.Attachment, error)
Types ¶
type UploadAttachmentFunc ¶
type UploadAttachmentFunc func(ctx context.Context, file *UploaderFile, attach *repo_model.Attachment) (*repo_model.Attachment, error)
type UploaderFile ¶
type UploaderFile struct {
// contains filtered or unexported fields
}
func NewLimitedUploaderKnownSize ¶
func NewLimitedUploaderKnownSize(r io.Reader, size int64) *UploaderFile
func NewLimitedUploaderMaxBytesReader ¶
func NewLimitedUploaderMaxBytesReader(r io.ReadCloser, w http.ResponseWriter) *UploaderFile
Click to show internal directories.
Click to hide internal directories.