Created
May 21, 2018 21:20
-
-
Save nrb/4dff94d1579cb9c06c5280500ca27a54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type writeReadDeleter interface { | |
| NewWriter(context.Context) io.WriteCloser | |
| NewReader(context.Context) (io.ReadCloser, error) | |
| Delete(context.Context) error | |
| } | |
| type objectIterator interface { | |
| Next() (writeReadDeleter, error) | |
| } | |
| // interface objecter represents an object compatible with the GCP object object API | |
| type objecter interface { | |
| Object(string) writeReadDeleter | |
| Objects(context.Context, *storage.Query) objectIterator | |
| } | |
| // Interface bucketer represents a client compatible with the GCP object storage API. | |
| type bucketer interface { | |
| // Bucket returns an object representing a GCP object storage bucket | |
| Bucket(string) objecter | |
| } | |
| type objectStore struct { | |
| client bucketer | |
| googleAccessID string | |
| privateKey []byte | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment