MCPcopy Create free account
hub / github.com/facebook/time / PushVersion

Method PushVersion

calnex/api/api.go:814–824  ·  view source on GitHub ↗

PushVersion uploads a new Firmware Version to the device

(path string)

Source from the content-addressed store, hash-verified

812}
813
814// PushVersion uploads a new Firmware Version to the device
815func (a *API) PushVersion(path string) (*Result, error) {
816 fw, err := os.Open(path)
817 if err != nil {
818 return nil, err
819 }
820 defer fw.Close()
821
822 url := fmt.Sprintf(firmwareURL, a.source)
823 r, err := a.postFile(url, fw)
824 return r, err //nolint:nilnil
825}
826
827// PushCert uploads a new Certificate to the device

Callers 2

FirmwareMethod · 0.95
TestPushVersionFunction · 0.95

Calls 3

postFileMethod · 0.95
OpenMethod · 0.65
CloseMethod · 0.65

Tested by 1

TestPushVersionFunction · 0.76