Documentation ¶
Index ¶
- Constants
- func CreateJSONResponse(c context.Context, images []File, cursor string) ([]byte, error)
- func FileListViewHandler(rw http.ResponseWriter, req *http.Request)
- func GetParentKey(c context.Context) *datastore.Key
- func GetServingURL(c context.Context, filename string) (servingURL *url.URL, err error)
- func NewFileKey(c context.Context) (*datastore.Key, error)
- func Store(c context.Context, data []byte, fileName, mimeType, bucketName string) (absFilename string, err error)
- func StoreImage(c context.Context, key *datastore.Key, servingURL, fileName, gcsPath string) error
- func UploadHandler(rw http.ResponseWriter, req *http.Request)
- type File
- type ResponseData
- type Type
Constants ¶
View Source
const KIND_FILE = "File"
Variables ¶
This section is empty.
Functions ¶
func CreateJSONResponse ¶
ファイルの一覧をクライアントに返すため、FileのスライスをJSONシリアライズします。
func FileListViewHandler ¶
func FileListViewHandler(rw http.ResponseWriter, req *http.Request)
func GetServingURL ¶
GetServingURL gets URL to serve GCS file to users.
func Store ¶
func Store(c context.Context, data []byte, fileName, mimeType, bucketName string) (absFilename string, err error)
Store binary data to GCS
func StoreImage ¶
アップロードされた画像のメタデータをDSに保存します。
func UploadHandler ¶
func UploadHandler(rw http.ResponseWriter, req *http.Request)
Types ¶
type File ¶
type ResponseData ¶
Click to show internal directories.
Click to hide internal directories.