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

Side by Side Diff: service/user/testable.go

Issue 2021753002: Change gae to apache 2 license. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The LUCI 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 under the Apache License, Version 2.0
3 // found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package user 5 package user
6 6
7 // Testable is the interface that test implimentations will provide. 7 // Testable is the interface that test implimentations will provide.
8 type Testable interface { 8 type Testable interface {
9 // SetUser sets the user to a pre-populated User object. 9 // SetUser sets the user to a pre-populated User object.
10 SetUser(*User) 10 SetUser(*User)
11 11
12 // Login will generate and set a new User object with values derived fro m 12 // Login will generate and set a new User object with values derived fro m
13 // email clientID, and admin values. If clientID is provided, the User w ill 13 // email clientID, and admin values. If clientID is provided, the User w ill
14 // look like they logged in with OAuth. If it's empty, then this will lo ok 14 // look like they logged in with OAuth. If it's empty, then this will lo ok
15 // like they logged in via the cookie auth method. 15 // like they logged in via the cookie auth method.
16 Login(email, clientID string, admin bool) 16 Login(email, clientID string, admin bool)
17 17
18 // Equivalent to SetUser(nil), but a bit more obvious to read in the cod e :). 18 // Equivalent to SetUser(nil), but a bit more obvious to read in the cod e :).
19 Logout() 19 Logout()
20 } 20 }
OLDNEW
« no previous file with comments | « service/user/interface.go ('k') | service/user/user.go » ('j') | tools/proto-gae/proto_gae.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698