OLD | NEW |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(...string) (*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 func (u) Testable() user.Testable { panic(ni()) } |
177 | 178 |
178 var dummyUserInst = u{} | 179 var dummyUserInst = u{} |
179 | 180 |
180 // User returns a dummy user.Interface implementation suitable for embedding. | 181 // User returns a dummy user.Interface implementation suitable for embedding. |
181 // Every method panics with a message containing the name of the method which | 182 // Every method panics with a message containing the name of the method which |
182 // was unimplemented. | 183 // was unimplemented. |
183 func User() user.Interface { return dummyUserInst } | 184 func User() user.Interface { return dummyUserInst } |
OLD | NEW |