api

package module
v0.0.0-...-36f5769 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 16 Imported by: 0

README

Rocket Slate example upload backend

This is an example file upload backend written in Go

This uses gin, minio for file storage and GORM/PostgreSQL as database.

License

MIT License Copyright (c) 2019-2020 glebtv

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilesCreate

func FilesCreate(c *gin.Context)

func FilesServe

func FilesServe(c *gin.Context)

Types

type File

type File struct {
	ID int64 `gorm:"primary_key" json:"id"`

	IssueID int64  `gorm:"type:bigint REFERENCES issues(id);not null" json:"issue_id"`
	Issue   *Issue `json:"-"`

	Kind      string    `json:"kind"`
	Size      int64     `json:"size"`
	SHA1      []byte    `json:"sha1"`
	Name      string    `json:"name"`
	Mime      string    `json:"mime"`
	State     string    `json:"state"`
	Extension string    `json:"extension"`
	Path      *string   `json:"-" sql:"-"`
	URL       *string   `json:"url" sql:"-"`
	CreatedAt time.Time `json:"-"`
	Audited   `json:"-"`
}

func (*File) GetPath

func (f *File) GetPath() string

func (*File) GetUrl

func (f *File) GetUrl() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL