You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/cleaner/cleaner.go
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
// Package cleaner is a background process that compares the kubernetes namespace list with the folders in the local git home directory, deleting what's not in the namespace list
1
+
// Package cleaner is a background process that compares the kubernetes namespace list with the
2
+
// folders in the local git home directory, deleting what's not in the namespace list
2
3
package cleaner
3
4
4
5
import (
@@ -14,9 +15,11 @@ const (
14
15
dotGitSuffix=".git"
15
16
)
16
17
17
-
// Run starts the deleted app cleaner. This function listens to the Kubernetes event stream for events that indicate namespaces that were `DELETED`.
18
+
// Run starts the deleted app cleaner. This function listens to the Kubernetes event stream for
19
+
// events that indicate namespaces that were `DELETED`.
18
20
// If the namespace name matches a folder on the local filesystem, this func deletes that folder.
19
-
// Note that this function blocks until the watcher returned by `nsLister.Watch` is closed, so you should launch it in a goroutine.
21
+
// Note that this function blocks until the watcher returned by `nsLister.Watch` is closed, so
// EnvConfig is a convenience function to process the envconfig (https://github.com/kelseyhightower/envconfig) based configuration environment variables into conf. Additional notes:
14
+
// EnvConfig is a convenience function to process the envconfig (
15
+
// https://github.com/kelseyhightower/envconfig) based configuration environment variables into
16
+
// conf. Additional notes:
15
17
//
16
18
// - appName will be passed as the first parameter to envconfig.Process
17
-
// - conf should be a pointer to an envconfig compatible struct. If you'd like to use struct tags to customize your struct, see https://github.com/kelseyhightower/envconfig#struct-tag-support
19
+
// - conf should be a pointer to an envconfig compatible struct. If you'd like to use struct
Copy file name to clipboardExpand all lines: pkg/gitreceive/storage/interfaces.go
+40-17Lines changed: 40 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ import (
6
6
s3 "github.com/minio/minio-go"
7
7
)
8
8
9
-
// BucketCreator is a *(github.com/minio/minio-go).Client compatible interface, restricted to just the MakeBucket function. You can use it in your code for easier unit testing without any external dependencies
9
+
// BucketCreator is a *(github.com/minio/minio-go).Client compatible interface, restricted to
10
+
// just the MakeBucket function. You can use it in your code for easier unit testing without
// ObjectStatter is a *(github.com/minio/minio-go).Client compatible interface, restricted to just the StatObject function. You can use it in your code for easier unit testing without any external dependencies
36
+
// ObjectStatter is a *(github.com/minio/minio-go).Client compatible interface, restricted to
37
+
// just the StatObject function. You can use it in your code for easier unit testing without
// ObjectPutter is a *(github.com/minio/minio-go).Client compatible interface, restricted to just the PutObject function. You can use it in your code for easier unit testing without any external dependencies
62
+
// ObjectPutter is a *(github.com/minio/minio-go).Client compatible interface, restricted to just
63
+
// the PutObject function. You can use it in your code for easier unit testing without any
// Object is a *(github.com/minio/minio-go).Object compatible interface. Currently, ObjectGetter returns these so that FakeObjectGetters can return mock implementations
95
+
// Object is a *(github.com/minio/minio-go).Object compatible interface. Currently, ObjectGetter
96
+
// returns these so that FakeObjectGetters can return mock implementations
87
97
typeObjectinterface {
88
-
// This is called an interface composition - it automatically gives your interface the function in io.Reader (https://godoc.org/io#Reader) and the function in io.Closer (https://godoc.org/io#Closer)
98
+
// This is called an interface composition - it automatically gives your interface the function
99
+
// in io.Reader (https://godoc.org/io#Reader) and the function in io.Closer
100
+
// (https://godoc.org/io#Closer)
89
101
io.ReadCloser
90
-
// This is also an interface composition. It gives your interface the function in io.Seeker (https://godoc.org/io#Seeker)
102
+
// This is also an interface composition. It gives your interface the function in
103
+
// io.Seeker (https://godoc.org/io#Seeker)
91
104
io.Seeker
92
-
// This is also interface composition. It gives your interface the function in io.ReaderAt (https://godoc.org/io#ReaderAt)
105
+
// This is also interface composition. It gives your interface the function in
106
+
// io.ReaderAt (https://godoc.org/io#ReaderAt)
93
107
io.ReaderAt
94
-
// This function is the last one we have to add to make this interface have all the same functions as s3.Object
108
+
// This function is the last one we have to add to make this interface have all the same
109
+
// functions as s3.Object
95
110
Stat() (s3.ObjectInfo, error)
96
111
}
97
112
98
-
// ObjectGetter is the interface to get an object from object storage. The minio client doesn't already satisfy this interface, because the GetObject func (https://godoc.org/github.com/minio/minio-go#Client.GetObject) doesn't return an Object. Instead, it returns a *s3.Object. Use the RealObjectGetter below to use the minio client
113
+
// ObjectGetter is the interface to get an object from object storage. The minio client doesn't
114
+
// already satisfy this interface, because the GetObject func
115
+
// (https://godoc.org/github.com/minio/minio-go#Client.GetObject) doesn't return an Object.
116
+
// Instead, it returns a *s3.Object. Use the RealObjectGetter below to use the minio client
99
117
typeObjectGetterinterface {
100
-
// GetObject is *almost* the same function as the GetObject func in the minio client, but it returns Object instead of *s3.Object
118
+
// GetObject is *almost* the same function as the GetObject func in the minio client, but it
119
+
// returns Object instead of *s3.Object
101
120
GetObject(string, string) (Object, error)
102
121
}
103
122
104
-
// RealObjectGetter is an adapter to make the *s3.Client GetObject function compatible with the ObjectGetter interface
123
+
// RealObjectGetter is an adapter to make the *s3.Client GetObject function compatible with the
// DownloadObject uses the given getter to download the contents the object at ${bucketName}/${objKey} and returns the object's contents in the given byte slice. Returns nil and the appropriate error if there were problems with the download
80
+
// DownloadObject uses the given getter to download the contents the object at
81
+
// ${bucketName}/${objKey} and returns the object's contents in the given byte slice.
82
+
// Returns nil and the appropriate error if there were problems with the download
// PushKey returns the object storage key that the slug builder will store the slug in. The returned value only contains the path to the folder, not including the final filename.
37
+
// PushKey returns the object storage key that the slug builder will store the slug in.
38
+
// The returned value only contains the path to the folder, not including the final filename.
// PushURL returns the complete object storage URL that the slug builder will store the slug in. The returned value only contains the URL to the folder, not including the final filename.
41
+
// PushURL returns the complete object storage URL that the slug builder will store the slug in.
42
+
// The returned value only contains the URL to the folder, not including the final filename.
// TarKey returns the object storage key from which the slug builder will download for the tarball (from which it uses to build the slug). The returned value only contains the path to the folder, not including the final filename.
45
+
// TarKey returns the object storage key from which the slug builder will download for the tarball
46
+
// (from which it uses to build the slug). The returned value only contains the path to the
// TarURL returns the complete object storage URL that the slug builder will download the tarball from. The returned value only contains the URL to the folder, not including the final filename.
50
+
// TarURL returns the complete object storage URL that the slug builder will download the tarball
51
+
// from. The returned value only contains the URL to the folder, not including the final filename.
0 commit comments