Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tank
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
tank
Commits
1e35f058
Commit
1e35f058
authored
7 years ago
by
Christian Pointner
Browse files
Options
Downloads
Patches
Plain Diff
added struct for import representation in store
parent
3040e019
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
store/types.go
+39
-1
39 additions, 1 deletion
store/types.go
with
39 additions
and
1 deletion
store/types.go
+
39
−
1
View file @
1e35f058
...
...
@@ -38,6 +38,7 @@ const (
publicGroupBn
=
"_public"
importsBn
=
"imports"
filesBn
=
"files"
playlistsBn
=
"playlists"
...
...
@@ -46,7 +47,7 @@ const (
)
var
(
groupBuckets
=
[]
string
{
filesBn
,
playlistsBn
}
// these buckets will be created inside every group bucket
groupBuckets
=
[]
string
{
importsBn
,
filesBn
,
playlistsBn
}
// these buckets will be created inside every group bucket
ErrNotImplented
=
errors
.
New
(
"not implemented"
)
ErrNotFound
=
errors
.
New
(
"not found"
)
...
...
@@ -83,6 +84,43 @@ type TimeAndUser struct {
Timestamp
time
.
Time
`josn:"timestamp"`
}
// stored in importsBn
type
ImportState
int
const
(
ImportNew
ImportState
=
iota
ImportPending
ImportRunning
ImportAborted
ImportDone
)
func
(
s
ImportState
)
String
()
string
{
switch
s
{
case
ImportNew
:
return
"new"
case
ImportRunning
:
return
"running"
case
ImportAborted
:
return
"aborted"
case
ImportDone
:
return
"done"
}
return
"unknown"
}
func
(
s
ImportState
)
MarshalText
()
(
data
[]
byte
,
err
error
)
{
data
=
[]
byte
(
s
.
String
())
return
}
type
Import
struct
{
Created
TimeAndUser
`json:"created"`
State
ImportState
`json:"state"`
Success
bool
`json:"success"`
Log
map
[
int64
]
string
`json:"log"`
}
// stored in filesBn
type
FileSource
struct
{
FileName
string
`json:"filename"`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment