Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: common/config/impl/erroring/erroring.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/config/filters/caching/doc.go ('k') | common/data/text/templateproto/loader.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/config/impl/erroring/erroring.go
diff --git a/common/config/impl/erroring/erroring.go b/common/config/impl/erroring/erroring.go
deleted file mode 100644
index 48109497240f294c2ccdd813e0316c82a57e1adb..0000000000000000000000000000000000000000
--- a/common/config/impl/erroring/erroring.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2015 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-// Package erroring implements config.Interface that simply returns an error.
-//
-// May be handy as a placeholder in case some more useful implementation is not
-// available.
-package erroring
-
-import (
- "net/url"
-
- "golang.org/x/net/context"
-
- "github.com/luci/luci-go/common/config"
-)
-
-// New produces config.Interface instance that returns the given error for all
-// calls.
-//
-// Panics if given err is nil.
-func New(err error) config.Interface {
- if err == nil {
- panic("the error must not be nil")
- }
- return erroringImpl{err}
-}
-
-type erroringImpl struct {
- err error
-}
-
-func (e erroringImpl) ServiceURL(ctx context.Context) url.URL {
- return url.URL{
- Scheme: "error",
- }
-}
-
-func (e erroringImpl) GetConfig(ctx context.Context, configSet, path string, hashOnly bool) (*config.Config, error) {
- return nil, e.err
-}
-
-func (e erroringImpl) GetConfigByHash(ctx context.Context, contentHash string) (string, error) {
- return "", e.err
-}
-
-func (e erroringImpl) GetConfigSetLocation(ctx context.Context, configSet string) (*url.URL, error) {
- return nil, e.err
-}
-
-func (e erroringImpl) GetProjectConfigs(ctx context.Context, path string, hashesOnly bool) ([]config.Config, error) {
- return nil, e.err
-}
-
-func (e erroringImpl) GetProjects(ctx context.Context) ([]config.Project, error) {
- return nil, e.err
-}
-
-func (e erroringImpl) GetRefConfigs(ctx context.Context, path string, hashesOnly bool) ([]config.Config, error) {
- return nil, e.err
-}
-
-func (e erroringImpl) GetRefs(ctx context.Context, projectID string) ([]string, error) {
- return nil, e.err
-}
« no previous file with comments | « common/config/filters/caching/doc.go ('k') | common/data/text/templateproto/loader.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698