Documentation ¶
Overview ¶
This code serves as an example and is not meant for production use.
Copyright 2020 Veeva Systems Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func APIVersion() string
- func ActiveJobs() map[string]string
- func AuthResult() *model.AuthResult
- func DomainName() string
- func InitConfig()
- func Password() string
- func RemoveActiveJob(jobID string)
- func ResetAuthResult()
- func ResetConfig()
- func SetAuthResult(result *model.AuthResult)
- func SetPassword(password string)
- func SetUploadSessionID(sessionID string)
- func UpdateActiveJob(jobID, status string)
- func UpdateConfig()
- func UploadSessionID() string
- func Username() string
Constants ¶
const ( Size5MB = 5 * 1024 * 1024 Size50MB = 50 * 1024 * 1024 JobTimeoutSeconds = 60 )
const ( ConfigKeyDomainName = "domain_name" ConfigKeyAPIVersion = "api_version" ConfigKeyUsername = "username" ConfigKeyPassword = "password" ConfigAuthResult = "auth_result" ConfigUploadSessionID = "upload_session_id" ConfigActiveJobIDs = "active_jobs" )
Variables ¶
var EnableDebug bool
Functions ¶
func AuthResult ¶
func AuthResult() *model.AuthResult
AuthResult - return auth result from configuration
func RemoveActiveJob ¶
func RemoveActiveJob(jobID string)
RemoveActiveJob - remove and update list of active jobs in the configuration
func SetAuthResult ¶ added in v0.0.3
func SetAuthResult(result *model.AuthResult)
SetAuthResult - Save auth result in the configuration
func SetPassword ¶
func SetPassword(password string)
SetPassword - store password in the configuration
func SetUploadSessionID ¶ added in v0.0.3
func SetUploadSessionID(sessionID string)
SetUploadSessionID - Store upload session id in the configuration
func UpdateActiveJob ¶
func UpdateActiveJob(jobID, status string)
UpdateActiveJob - update list of active jobs in the configuration
func UploadSessionID ¶
func UploadSessionID() string
UploadSessionID - return upload session id from configuration
Types ¶
This section is empty.