| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |