forked from drone/go-scm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.go
36 lines (29 loc) · 953 Bytes
/
org.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2017 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package scm
import (
"context"
)
type (
// Organization represents an organization account.
Organization struct {
Name string
Avatar string
}
// Membership represents an organization membership.
Membership struct {
Active bool
Role Role
}
// OrganizationService provides access to organization resources.
OrganizationService interface {
// Find returns the organization by name.
Find(ctx context.Context, name string) (*Organization, *Response, error)
// FindMembership returns the organization membership
// by a given user account.
FindMembership(ctx context.Context, name, username string) (*Membership, *Response, error)
// List returns the user organization list.
List(ctx context.Context, opts ListOptions) ([]*Organization, *Response, error)
}
)