Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
hdacloud
dex
Commits
c0aa63ac
Commit
c0aa63ac
authored
8 years ago
by
Eric Chiang
Browse files
Options
Downloads
Patches
Plain Diff
storage: update godocs
parent
d7912a3a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
storage/kubernetes/doc.go
+1
-1
1 addition, 1 deletion
storage/kubernetes/doc.go
storage/storage.go
+13
-2
13 additions, 2 deletions
storage/storage.go
with
14 additions
and
3 deletions
storage/kubernetes/doc.go
+
1
−
1
View file @
c0aa63ac
// Package kubernetes provides a storage i
nterface
using Kubernetes third party APIs.
// Package kubernetes provides a storage i
mplementation
using Kubernetes third party APIs.
package
kubernetes
package
kubernetes
This diff is collapsed.
Click to expand it.
storage/storage.go
+
13
−
2
View file @
c0aa63ac
...
@@ -78,9 +78,20 @@ type Storage interface {
...
@@ -78,9 +78,20 @@ type Storage interface {
DeleteRefresh
(
id
string
)
error
DeleteRefresh
(
id
string
)
error
DeletePassword
(
email
string
)
error
DeletePassword
(
email
string
)
error
// Update functions are assumed to be a performed within a single object transaction.
// Update methods take a function for updating an object then performs that update within
// a transaction. "updater" functions may be called multiple times by a single update call.
//
// Because new fields may be added to resources, updaters should only modify existing
// fields on the old object rather then creating new structs. For example:
//
// updater := func(old storage.Client) (storage.Client, error) {
// old.Secret = newSecret
// return old, nil
// }
// if err := s.UpdateClient(clientID, updater); err != nil {
// // update failed, handle error
// }
//
//
// updaters may be called multiple times.
UpdateClient
(
id
string
,
updater
func
(
old
Client
)
(
Client
,
error
))
error
UpdateClient
(
id
string
,
updater
func
(
old
Client
)
(
Client
,
error
))
error
UpdateKeys
(
updater
func
(
old
Keys
)
(
Keys
,
error
))
error
UpdateKeys
(
updater
func
(
old
Keys
)
(
Keys
,
error
))
error
UpdateAuthRequest
(
id
string
,
updater
func
(
a
AuthRequest
)
(
AuthRequest
,
error
))
error
UpdateAuthRequest
(
id
string
,
updater
func
(
a
AuthRequest
)
(
AuthRequest
,
error
))
error
...
...
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