Documentation ¶
Overview ¶
Package v1alpha1 contains versioned team link contracts.
Index ¶
- Variables
- type GitHubMapper
- type GitHubTeam
- func (*GitHubTeam) Descriptor() ([]byte, []int)deprecated
- func (x *GitHubTeam) GetOrgId() int64
- func (x *GitHubTeam) GetSourceTeamIds() []string
- func (x *GitHubTeam) GetTeamId() int64
- func (x *GitHubTeam) GetUsers() []*GitHubUser
- func (*GitHubTeam) ProtoMessage()
- func (x *GitHubTeam) ProtoReflect() protoreflect.Message
- func (x *GitHubTeam) Reset()
- func (x *GitHubTeam) String() string
- type GitHubTeamResolver
- type GitHubUser
- func (*GitHubUser) Descriptor() ([]byte, []int)deprecated
- func (x *GitHubUser) GetEmail() string
- func (x *GitHubUser) GetLabels() map[string]string
- func (x *GitHubUser) GetLogin() string
- func (x *GitHubUser) GetUserId() int64
- func (*GitHubUser) ProtoMessage()
- func (x *GitHubUser) ProtoReflect() protoreflect.Message
- func (x *GitHubUser) Reset()
- func (x *GitHubUser) String() string
- type SourceEvent
- type TeamSynchronizer
Constants ¶
This section is empty.
Variables ¶
var File_team_link_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GitHubMapper ¶
type GitHubMapper interface { // GitHubUser returns a GitHubUser that contains the GitHub user // information for the given source user id. GitHubUser(ctx context.Context, srcUserID string) (*GitHubUser, error) // GitHubTeams returns a list of GitHubTeams that contains the GitHub team // information for the given source team id. Note that the relationship for // source to GitHub team could be many to many. GitHubTeams(ctx context.Context, srcTeamID string) ([]*GitHubTeam, error) }
GitHubMapper maps destination(GitHub) teams/users to source teams/users. The actual team and user ids depend on the type of source/destination systems.
type GitHubTeam ¶
type GitHubTeam struct { // Required. GitHub team ID. TeamId int64 `protobuf:"varint,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` // Required. GitHub Organization ID. OrgId int64 `protobuf:"varint,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` // Required. GitHub users to be added to the team. Users []*GitHubUser `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` // Required. Linked source team IDs. The actual value depending on the source // team service API, what value it uses to retrieve the source team. SourceTeamIds []string `protobuf:"bytes,4,rep,name=source_team_ids,json=sourceTeamIds,proto3" json:"source_team_ids,omitempty"` // contains filtered or unexported fields }
A snapshot of a GitHub team's memberships.
func (*GitHubTeam) Descriptor
deprecated
func (*GitHubTeam) Descriptor() ([]byte, []int)
Deprecated: Use GitHubTeam.ProtoReflect.Descriptor instead.
func (*GitHubTeam) GetOrgId ¶
func (x *GitHubTeam) GetOrgId() int64
func (*GitHubTeam) GetSourceTeamIds ¶
func (x *GitHubTeam) GetSourceTeamIds() []string
func (*GitHubTeam) GetTeamId ¶
func (x *GitHubTeam) GetTeamId() int64
func (*GitHubTeam) GetUsers ¶
func (x *GitHubTeam) GetUsers() []*GitHubUser
func (*GitHubTeam) ProtoMessage ¶
func (*GitHubTeam) ProtoMessage()
func (*GitHubTeam) ProtoReflect ¶
func (x *GitHubTeam) ProtoReflect() protoreflect.Message
func (*GitHubTeam) Reset ¶
func (x *GitHubTeam) Reset()
func (*GitHubTeam) String ¶
func (x *GitHubTeam) String() string
type GitHubTeamResolver ¶
type GitHubTeamResolver interface { // Resolve resolves a SourceEvent of a source team membership change and it // does the following: // 1. Find the GitHub teams that the source team is mapped to, and for each // GitHub team, get all the source teams that it mapped to. // 2. Return a list of GitHubTeam objects and each contains all memberships // of its mapped source teams and the GitHub team info, so that downstream // can sync the memberships to the GitHub teams. Resolve(context.Context, *SourceEvent) ([]*GitHubTeam, error) }
GitHubTeamResolver interface that resolves source event and returns a list GitHubTeam objects.
type GitHubUser ¶
type GitHubUser struct { // Required. GitHub user email address. Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // GitHub user login/username. Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"` // GitHub user id. UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Optional. Any additional information such as type of the user (employee, vendor, etc.). Labels map[string]string `` /* 154-byte string literal not displayed */ // contains filtered or unexported fields }
A representation of a GitHub User.
func (*GitHubUser) Descriptor
deprecated
func (*GitHubUser) Descriptor() ([]byte, []int)
Deprecated: Use GitHubUser.ProtoReflect.Descriptor instead.
func (*GitHubUser) GetEmail ¶
func (x *GitHubUser) GetEmail() string
func (*GitHubUser) GetLabels ¶
func (x *GitHubUser) GetLabels() map[string]string
func (*GitHubUser) GetLogin ¶
func (x *GitHubUser) GetLogin() string
func (*GitHubUser) GetUserId ¶
func (x *GitHubUser) GetUserId() int64
func (*GitHubUser) ProtoMessage ¶
func (*GitHubUser) ProtoMessage()
func (*GitHubUser) ProtoReflect ¶
func (x *GitHubUser) ProtoReflect() protoreflect.Message
func (*GitHubUser) Reset ¶
func (x *GitHubUser) Reset()
func (*GitHubUser) String ¶
func (x *GitHubUser) String() string
type SourceEvent ¶
type SourceEvent struct { // Required. Source team ID. TeamId int64 `protobuf:"varint,1,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` // contains filtered or unexported fields }
A representation of an event associated with creation/modification of a source team's memberships.
func (*SourceEvent) Descriptor
deprecated
func (*SourceEvent) Descriptor() ([]byte, []int)
Deprecated: Use SourceEvent.ProtoReflect.Descriptor instead.
func (*SourceEvent) GetTeamId ¶
func (x *SourceEvent) GetTeamId() int64
func (*SourceEvent) ProtoMessage ¶
func (*SourceEvent) ProtoMessage()
func (*SourceEvent) ProtoReflect ¶
func (x *SourceEvent) ProtoReflect() protoreflect.Message
func (*SourceEvent) Reset ¶
func (x *SourceEvent) Reset()
func (*SourceEvent) String ¶
func (x *SourceEvent) String() string
type TeamSynchronizer ¶
type TeamSynchronizer interface { // Sync syncs the team memberships in the each of the GitHubTeam from the // given list to GitHub. Sync(context.Context, []*GitHubTeam) error }
TeamSynchronizer interface that syncs the team memberships in the each of the GitHubTeam from the given list to GitHub.