Documentation
¶
Index ¶
- type Manifest
- type ManifestFile
- func (*ManifestFile) Add(records []ManifestFileParams) error
- func (*ManifestFile) Get(manifestId int32, limit int32, offset int32) ([]ManifestFile, error)
- func (*ManifestFile) GetAll() ([]ManifestFile, error)
- func (*ManifestFile) GetByStatus(manifestId int32, statusArray []manifestFile.Status, limit int, offset int) ([]ManifestFile, error)
- func (*ManifestFile) RemoveFromManifest(manifestId int32, removePath string) error
- func (*ManifestFile) ReplacePath(manifestId int32, path string, replacePath string, fileIds []int32)
- func (*ManifestFile) ResetStatusForManifest(manifestId int32) error
- func (*ManifestFile) SyncResponseStatusUpdate(manifestId int32, statusList []manifestFile.FileStatusDTO) error
- func (*ManifestFile) SyncResponseStatusUpdate2(manifestId int32, failedFiles []string)
- type ManifestFileParams
- type ManifestParams
- type NoClientSessionError
- type UserInfo
- type UserInfoParams
- type UserSettings
- type UserSettingsParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶ added in v0.1.2
type Manifest struct { Id int32 `json:"id"` NodeId sql.NullString `json:"node_id"` UserId string `json:"user_id"` UserName string `json:"user_name"` OrganizationId string `json:"organization_id"` OrganizationName string `json:"organization_name"` DatasetId string `json:"dataset_id"` DatasetName string `json:"dataset_name"` Status manifest.Status `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*Manifest) Add ¶ added in v0.1.2
func (m *Manifest) Add(s ManifestParams) (*Manifest, error)
Add adds multiple rows to the UploadRecords database.
func (*Manifest) SetManifestNodeId ¶ added in v0.2.0
type ManifestFile ¶ added in v0.1.2
type ManifestFile struct { Id int32 `json:"id"` ManifestId int32 `json:"manifest_id"` UploadId uuid.UUID `json:"upload_id"` SourcePath string `json:"source_path"` TargetPath string `json:"target_path"` TargetName string `json:"target_name"` Status manifestFile.Status `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*ManifestFile) Add ¶ added in v0.1.2
func (*ManifestFile) Add(records []ManifestFileParams) error
Add adds multiple rows to the UploadRecords database.
func (*ManifestFile) Get ¶ added in v0.1.2
func (*ManifestFile) Get(manifestId int32, limit int32, offset int32) ([]ManifestFile, error)
Get returns manifest paginated manifest files.
func (*ManifestFile) GetAll ¶ added in v0.1.2
func (*ManifestFile) GetAll() ([]ManifestFile, error)
GetAll returns all rows in the Upload Record Table
func (*ManifestFile) GetByStatus ¶ added in v0.2.0
func (*ManifestFile) GetByStatus(manifestId int32, statusArray []manifestFile.Status, limit int, offset int) ([]ManifestFile, error)
GetByStatus returns files in a manifest filtered by status.
func (*ManifestFile) RemoveFromManifest ¶ added in v0.2.0
func (*ManifestFile) RemoveFromManifest(manifestId int32, removePath string) error
RemoveFromManifest removes files from local manifest by path.
func (*ManifestFile) ReplacePath ¶ added in v0.2.0
func (*ManifestFile) ReplacePath(manifestId int32, path string, replacePath string, fileIds []int32)
ReplacePath allows users to replace the target path with another path.
func (*ManifestFile) ResetStatusForManifest ¶ added in v0.2.0
func (*ManifestFile) ResetStatusForManifest(manifestId int32) error
func (*ManifestFile) SyncResponseStatusUpdate ¶ added in v0.2.0
func (*ManifestFile) SyncResponseStatusUpdate(manifestId int32, statusList []manifestFile.FileStatusDTO) error
func (*ManifestFile) SyncResponseStatusUpdate2 ¶ added in v0.2.0
func (*ManifestFile) SyncResponseStatusUpdate2(manifestId int32, failedFiles []string)
SyncResponseStatusUpdate2 updates local DB based on successful/unsuccessful updates remotely. 1. Set to SYNCED for all files that were successfully synchronized (Initiated, Failed) 2. Remove files with REMOVED that were successfully removed remotely.
type ManifestFileParams ¶ added in v0.1.2
type ManifestParams ¶ added in v0.1.2
type NoClientSessionError ¶ added in v0.1.0
type NoClientSessionError struct{}
func (*NoClientSessionError) Error ¶ added in v0.1.0
func (m *NoClientSessionError) Error() string
type UserInfo ¶
type UserInfo struct { InnerId int `json:"inner_id"` Id string `json:"id"` Name string `json:"name"` SessionToken string `json:"session_token"` RefreshToken string `json:"refresh_token"` TokenExpire time.Time `json:"token_expire"` IdToken string `json:"id_token"` Profile string `json:"profile"'` Environment string `json:"environment"` OrganizationId string `json:"organization_id"` OrganizationName string `json:"organization_name"` UpdatedAt time.Time `json:"updated_at"` }
func CreateNewUserInfo ¶ added in v0.0.5
func CreateNewUserInfo(data UserInfoParams) (*UserInfo, error)
func UpdateTokenForUser ¶ added in v0.0.5
func UpdateTokenForUser(user *UserInfo, credentials *pennsieve.APISession) (*UserInfo, error)
type UserInfoParams ¶
type UserSettings ¶
type UserSettings struct { UserId string `json:"user_id"` Profile string `json:"profile"` UseDatasetId string `json:"use_dataset_id"` UploadSessionId string `json:"upload_session_id"` }
func CreateNewUserSettings ¶ added in v0.0.5
func CreateNewUserSettings(data UserSettingsParams) (*UserSettings, error)
CreateNewUserSettings creates or replaces existing user-settings row in db.
func (*UserSettings) Get ¶ added in v0.1.0
func (*UserSettings) Get() (*UserSettings, error)
Get returns the UserSettings object or nil if no user-settings are defined.
func (*UserSettings) UpdateActiveDataset ¶ added in v0.1.0
func (*UserSettings) UpdateActiveDataset(datasetId string) error