box-sdk-go: github.com/QSCTech/box-sdk-go Index | Files | Directories

package box

import "github.com/QSCTech/box-sdk-go"

Index

Package Files

Service.go init.go

type ChangeParam Uses

type ChangeParam struct {
    NewToken   string `type:"form"`
    Jiami      string `type:"form"`
    OldToken   string `type:"form" require:"true"`
    SecureId   string `type:"form" require:"true"`
    TokenSec   string `type:"form"`
    OldSec     string `type:"form"`
    Expiration int    `type:"form" require:"true"`
}

change

type ChangeResult Uses

type ChangeResult struct {
    Message  string
    NewToken string
    Status   int // 0: Success; 1: fail
    Url      string
}

type SecParam Uses

type SecParam struct {
    Token    string `type:"path"`
    SecToken string `type:"path"`
}

verify security token

type Service Uses

type Service struct {
    Upload      func(param *UploadParam) (gotten.Response, error) `method:"POST" path:"add_item"`
    Change      func(param *ChangeParam) (gotten.Response, error) `method:"POST" path:"change_item"`
    Stat        func(param *TokenParam) (gotten.Response, error)  `path:"issec/{token}"`              // resp: YES / NO<SP>
    Verify      func(param *SecParam) (gotten.Response, error)    `path:"verify/{token}/{sec_token}"` // resp: Y / N
    Download    func(param *TokenParam) (gotten.Response, error)  `path:"get/{token}"`
    DownloadSec func(param *SecParam) (gotten.Response, error)    `path:"get/{token}/{sec_token}"` // fail: html, no Content-Disposition
}

func GetService Uses

func GetService() *Service

GetService is a getter to get service singleton

type TokenParam Uses

type TokenParam struct {
    Token string `type:"path"`
}

get status

type UploadParam Uses

type UploadParam struct {
    PhpSession string          `type:"part" key:"PHP_SESSION_UPLOAD_PROGRESS" default:"qscbox"`
    Filecount  int             `type:"part" default:"1"`
    File       gotten.FilePath `type:"part" require:"true"`
    Callback   string          `type:"part" default:"handleUploadCallback"`
    IsIe9      int             `type:"part" default:"0"`
}

Upload

type UploadResult Uses

type UploadResult struct {
    Data struct {
        Error      string
        Expiration int
        Filename   string
        Secret     string `json:"secret"`
        SecureId   string `json:"secure_id"`
        Token      string
    }
    Err        int // 0: SUCCESS; -1: Fail
    Expiration int
    Msg        string
}

Directories

PathSynopsis
v2

Package box imports 6 packages (graph). Updated 2018-11-21. Refresh now. Tools for package owners.