file

package
v0.0.0-...-da38182 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name: "file",
	Subcommands: []*cli.Command{
		{
			Name:   "list",
			Action: cmdList,
			Flags: []cli.Flag{
				flagFileID,
			},
		},
		{
			Name:   "upload",
			Action: cmdUpload,
			Flags: []cli.Flag{
				rflagFile,
				rflagPurpose,
			},
		},
		{
			Name:   "delete",
			Action: cmdDelete,
			Flags: []cli.Flag{
				rflagFileID,
			},
		},
		{
			Name:   "content",
			Action: cmdContent,
			Flags: []cli.Flag{
				rflagFileID,
			},
		},
	},
}

Functions

func Get

func Get(ctx *cli.Context) error

func List

func List(ctx *cli.Context) error

Types

type Data

type Data struct {
	ID        string `json:"id"`
	Object    string `json:"object"`
	Bytes     int    `json:"bytes"`
	CreatedAt int    `json:"created_at"`
	FileName  string `json:"filename"`
	Purpose   string `json:"purpose"`
}

type Request

type Request struct {
	File    string `json:"file"`
	Purpose string `json:"purpose"`
}

type Response

type Response struct {
	Data   []Data `json:"data"`
	Object string `json:"object"`
}

type ResponseFileDelete

type ResponseFileDelete struct {
	ID      string `json:"id"`
	Object  string `json:"object"`
	Deleted bool   `json:"deleted"`
}

type ResponseFileUpload

type ResponseFileUpload struct {
	ID        string `json:"id"`
	Object    string `json:"object"`
	Bytes     int    `json:"bytes"`
	CreatedAt int    `json:"created_at"`
	FileName  string `json:"filename"`
	Purpose   string `json:"purpose"`
}

Jump to

Keyboard shortcuts

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