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

Side by Side Diff: impl/dummy/dummy.go

Issue 1493183003: Fix User API (CurrentOAuth) (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | impl/prod/user.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package dummy 5 package dummy
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "runtime" 9 "runtime"
10 "strings" 10 "strings"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Info returns a dummy info.Interface implementation suitable for embedding. 161 // Info returns a dummy info.Interface implementation suitable for embedding.
162 // Every method panics with a message containing the name of the method which 162 // Every method panics with a message containing the name of the method which
163 // was unimplemented. 163 // was unimplemented.
164 func Info() info.Interface { return dummyInfoInst } 164 func Info() info.Interface { return dummyInfoInst }
165 165
166 ////////////////////////////////////// u /////////////////////////////////////// 166 ////////////////////////////////////// u ///////////////////////////////////////
167 167
168 type u struct{} 168 type u struct{}
169 169
170 func (u) Current() *user.User { panic(ni()) } 170 func (u) Current() *user.User { panic(ni()) }
171 func (u) CurrentOAuth() (*user.User, error) { panic(ni()) } 171 func (u) CurrentOAuth(...string) (*user.User, error) { panic(ni()) }
172 func (u) IsAdmin() bool { panic(ni()) } 172 func (u) IsAdmin() bool { panic(ni()) }
173 func (u) LoginURL(string) (string, error) { panic(ni()) } 173 func (u) LoginURL(string) (string, error) { panic(ni()) }
174 func (u) LoginURLFederated(string, string) (string, error) { panic(ni()) } 174 func (u) LoginURLFederated(string, string) (string, error) { panic(ni()) }
175 func (u) LogoutURL(string) (string, error) { panic(ni()) } 175 func (u) LogoutURL(string) (string, error) { panic(ni()) }
176 func (u) OAuthConsumerKey() (string, error) { panic(ni()) } 176 func (u) OAuthConsumerKey() (string, error) { panic(ni()) }
177 177
178 var dummyUserInst = u{} 178 var dummyUserInst = u{}
179 179
180 // User returns a dummy user.Interface implementation suitable for embedding. 180 // User returns a dummy user.Interface implementation suitable for embedding.
181 // Every method panics with a message containing the name of the method which 181 // Every method panics with a message containing the name of the method which
182 // was unimplemented. 182 // was unimplemented.
183 func User() user.Interface { return dummyUserInst } 183 func User() user.Interface { return dummyUserInst }
OLDNEW
« no previous file with comments | « no previous file | impl/prod/user.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698