Documentation ¶
Index ¶
- type AddMemberRequest
- type Client
- type Group
- type GroupResponse
- type Member
- type MemberResponse
- type MockClient
- func (_m *MockClient) AddMemberToGroup(ctx context.Context, grp *Group, member *Member) error
- func (_m *MockClient) CreateGroup(ctx context.Context, grp *Group) (*Group, error)
- func (_m *MockClient) DeleteGroup(ctx context.Context, grpID uuid.UUID) error
- func (_m *MockClient) EXPECT() *MockClient_Expecter
- func (_m *MockClient) GetGroupById(ctx context.Context, id uuid.UUID) (*Group, error)
- func (_m *MockClient) GetOrCreateGroup(ctx context.Context, existingGroupID *uuid.UUID, name string, ...) (*Group, bool, error)
- func (_m *MockClient) GetUser(ctx context.Context, email string) (*Member, error)
- func (_m *MockClient) ListGroupMembers(ctx context.Context, grp *Group) ([]*Member, error)
- func (_m *MockClient) ListGroupOwners(ctx context.Context, grp *Group) ([]*Member, error)
- func (_m *MockClient) RemoveMemberFromGroup(ctx context.Context, grp *Group, member *Member) error
- type MockClient_AddMemberToGroup_Call
- func (_c *MockClient_AddMemberToGroup_Call) Return(_a0 error) *MockClient_AddMemberToGroup_Call
- func (_c *MockClient_AddMemberToGroup_Call) Run(run func(ctx context.Context, grp *Group, member *Member)) *MockClient_AddMemberToGroup_Call
- func (_c *MockClient_AddMemberToGroup_Call) RunAndReturn(run func(context.Context, *Group, *Member) error) *MockClient_AddMemberToGroup_Call
- type MockClient_CreateGroup_Call
- func (_c *MockClient_CreateGroup_Call) Return(_a0 *Group, _a1 error) *MockClient_CreateGroup_Call
- func (_c *MockClient_CreateGroup_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_CreateGroup_Call
- func (_c *MockClient_CreateGroup_Call) RunAndReturn(run func(context.Context, *Group) (*Group, error)) *MockClient_CreateGroup_Call
- type MockClient_DeleteGroup_Call
- func (_c *MockClient_DeleteGroup_Call) Return(_a0 error) *MockClient_DeleteGroup_Call
- func (_c *MockClient_DeleteGroup_Call) Run(run func(ctx context.Context, grpID uuid.UUID)) *MockClient_DeleteGroup_Call
- func (_c *MockClient_DeleteGroup_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *MockClient_DeleteGroup_Call
- type MockClient_Expecter
- func (_e *MockClient_Expecter) AddMemberToGroup(ctx interface{}, grp interface{}, member interface{}) *MockClient_AddMemberToGroup_Call
- func (_e *MockClient_Expecter) CreateGroup(ctx interface{}, grp interface{}) *MockClient_CreateGroup_Call
- func (_e *MockClient_Expecter) DeleteGroup(ctx interface{}, grpID interface{}) *MockClient_DeleteGroup_Call
- func (_e *MockClient_Expecter) GetGroupById(ctx interface{}, id interface{}) *MockClient_GetGroupById_Call
- func (_e *MockClient_Expecter) GetOrCreateGroup(ctx interface{}, existingGroupID interface{}, name interface{}, ...) *MockClient_GetOrCreateGroup_Call
- func (_e *MockClient_Expecter) GetUser(ctx interface{}, email interface{}) *MockClient_GetUser_Call
- func (_e *MockClient_Expecter) ListGroupMembers(ctx interface{}, grp interface{}) *MockClient_ListGroupMembers_Call
- func (_e *MockClient_Expecter) ListGroupOwners(ctx interface{}, grp interface{}) *MockClient_ListGroupOwners_Call
- func (_e *MockClient_Expecter) RemoveMemberFromGroup(ctx interface{}, grp interface{}, member interface{}) *MockClient_RemoveMemberFromGroup_Call
- type MockClient_GetGroupById_Call
- func (_c *MockClient_GetGroupById_Call) Return(_a0 *Group, _a1 error) *MockClient_GetGroupById_Call
- func (_c *MockClient_GetGroupById_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockClient_GetGroupById_Call
- func (_c *MockClient_GetGroupById_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*Group, error)) *MockClient_GetGroupById_Call
- type MockClient_GetOrCreateGroup_Call
- func (_c *MockClient_GetOrCreateGroup_Call) Return(_a0 *Group, _a1 bool, _a2 error) *MockClient_GetOrCreateGroup_Call
- func (_c *MockClient_GetOrCreateGroup_Call) Run(run func(ctx context.Context, existingGroupID *uuid.UUID, name string, ...)) *MockClient_GetOrCreateGroup_Call
- func (_c *MockClient_GetOrCreateGroup_Call) RunAndReturn(run func(context.Context, *uuid.UUID, string, string) (*Group, bool, error)) *MockClient_GetOrCreateGroup_Call
- type MockClient_GetUser_Call
- func (_c *MockClient_GetUser_Call) Return(_a0 *Member, _a1 error) *MockClient_GetUser_Call
- func (_c *MockClient_GetUser_Call) Run(run func(ctx context.Context, email string)) *MockClient_GetUser_Call
- func (_c *MockClient_GetUser_Call) RunAndReturn(run func(context.Context, string) (*Member, error)) *MockClient_GetUser_Call
- type MockClient_ListGroupMembers_Call
- func (_c *MockClient_ListGroupMembers_Call) Return(_a0 []*Member, _a1 error) *MockClient_ListGroupMembers_Call
- func (_c *MockClient_ListGroupMembers_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_ListGroupMembers_Call
- func (_c *MockClient_ListGroupMembers_Call) RunAndReturn(run func(context.Context, *Group) ([]*Member, error)) *MockClient_ListGroupMembers_Call
- type MockClient_ListGroupOwners_Call
- func (_c *MockClient_ListGroupOwners_Call) Return(_a0 []*Member, _a1 error) *MockClient_ListGroupOwners_Call
- func (_c *MockClient_ListGroupOwners_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_ListGroupOwners_Call
- func (_c *MockClient_ListGroupOwners_Call) RunAndReturn(run func(context.Context, *Group) ([]*Member, error)) *MockClient_ListGroupOwners_Call
- type MockClient_RemoveMemberFromGroup_Call
- func (_c *MockClient_RemoveMemberFromGroup_Call) Return(_a0 error) *MockClient_RemoveMemberFromGroup_Call
- func (_c *MockClient_RemoveMemberFromGroup_Call) Run(run func(ctx context.Context, grp *Group, member *Member)) *MockClient_RemoveMemberFromGroup_Call
- func (_c *MockClient_RemoveMemberFromGroup_Call) RunAndReturn(run func(context.Context, *Group, *Member) error) *MockClient_RemoveMemberFromGroup_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMemberRequest ¶
type AddMemberRequest struct {
ODataID string `json:"@odata.id"`
}
type Client ¶
type Client interface { AddMemberToGroup(ctx context.Context, grp *Group, member *Member) error CreateGroup(ctx context.Context, grp *Group) (*Group, error) GetGroupById(ctx context.Context, id uuid.UUID) (*Group, error) GetOrCreateGroup(ctx context.Context, existingGroupID *uuid.UUID, name, description string) (*Group, bool, error) GetUser(ctx context.Context, email string) (*Member, error) ListGroupMembers(ctx context.Context, grp *Group) ([]*Member, error) ListGroupOwners(ctx context.Context, grp *Group) ([]*Member, error) RemoveMemberFromGroup(ctx context.Context, grp *Group, member *Member) error DeleteGroup(ctx context.Context, grpID uuid.UUID) error }
type Group ¶
type Group struct { ID string `json:"id,omitempty"` Description string `json:"description,omitempty"` DisplayName string `json:"displayName,omitempty"` GroupTypes []string `json:"groupTypes,omitempty"` MailEnabled bool `json:"mailEnabled"` MailNickname string `json:"mailNickname,omitempty"` SecurityEnabled bool `json:"securityEnabled"` }
type GroupResponse ¶
type GroupResponse struct {
Value []*Group
}
type Member ¶
type MemberResponse ¶
type MemberResponse struct {
Value []*Member
}
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t interface { mock.TestingT Cleanup(func()) }, ) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClient) AddMemberToGroup ¶
AddMemberToGroup provides a mock function with given fields: ctx, grp, member
func (*MockClient) CreateGroup ¶
CreateGroup provides a mock function with given fields: ctx, grp
func (*MockClient) DeleteGroup ¶
DeleteGroup provides a mock function with given fields: ctx, grpID
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
func (*MockClient) GetGroupById ¶
GetGroupById provides a mock function with given fields: ctx, id
func (*MockClient) GetOrCreateGroup ¶
func (_m *MockClient) GetOrCreateGroup(ctx context.Context, existingGroupID *uuid.UUID, name string, description string) (*Group, bool, error)
GetOrCreateGroup provides a mock function with given fields: ctx, existingGroupID, name, description
func (*MockClient) ListGroupMembers ¶
ListGroupMembers provides a mock function with given fields: ctx, grp
func (*MockClient) ListGroupOwners ¶
ListGroupOwners provides a mock function with given fields: ctx, grp
func (*MockClient) RemoveMemberFromGroup ¶
RemoveMemberFromGroup provides a mock function with given fields: ctx, grp, member
type MockClient_AddMemberToGroup_Call ¶
MockClient_AddMemberToGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMemberToGroup'
func (*MockClient_AddMemberToGroup_Call) Return ¶
func (_c *MockClient_AddMemberToGroup_Call) Return(_a0 error) *MockClient_AddMemberToGroup_Call
func (*MockClient_AddMemberToGroup_Call) Run ¶
func (_c *MockClient_AddMemberToGroup_Call) Run(run func(ctx context.Context, grp *Group, member *Member)) *MockClient_AddMemberToGroup_Call
func (*MockClient_AddMemberToGroup_Call) RunAndReturn ¶
func (_c *MockClient_AddMemberToGroup_Call) RunAndReturn(run func(context.Context, *Group, *Member) error) *MockClient_AddMemberToGroup_Call
type MockClient_CreateGroup_Call ¶
MockClient_CreateGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGroup'
func (*MockClient_CreateGroup_Call) Return ¶
func (_c *MockClient_CreateGroup_Call) Return(_a0 *Group, _a1 error) *MockClient_CreateGroup_Call
func (*MockClient_CreateGroup_Call) Run ¶
func (_c *MockClient_CreateGroup_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_CreateGroup_Call
func (*MockClient_CreateGroup_Call) RunAndReturn ¶
func (_c *MockClient_CreateGroup_Call) RunAndReturn(run func(context.Context, *Group) (*Group, error)) *MockClient_CreateGroup_Call
type MockClient_DeleteGroup_Call ¶
MockClient_DeleteGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGroup'
func (*MockClient_DeleteGroup_Call) Return ¶
func (_c *MockClient_DeleteGroup_Call) Return(_a0 error) *MockClient_DeleteGroup_Call
func (*MockClient_DeleteGroup_Call) Run ¶
func (_c *MockClient_DeleteGroup_Call) Run(run func(ctx context.Context, grpID uuid.UUID)) *MockClient_DeleteGroup_Call
func (*MockClient_DeleteGroup_Call) RunAndReturn ¶
func (_c *MockClient_DeleteGroup_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *MockClient_DeleteGroup_Call
type MockClient_Expecter ¶
type MockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClient_Expecter) AddMemberToGroup ¶
func (_e *MockClient_Expecter) AddMemberToGroup(ctx interface{}, grp interface{}, member interface{}) *MockClient_AddMemberToGroup_Call
AddMemberToGroup is a helper method to define mock.On call
- ctx context.Context
- grp *Group
- member *Member
func (*MockClient_Expecter) CreateGroup ¶
func (_e *MockClient_Expecter) CreateGroup(ctx interface{}, grp interface{}) *MockClient_CreateGroup_Call
CreateGroup is a helper method to define mock.On call
- ctx context.Context
- grp *Group
func (*MockClient_Expecter) DeleteGroup ¶
func (_e *MockClient_Expecter) DeleteGroup(ctx interface{}, grpID interface{}) *MockClient_DeleteGroup_Call
DeleteGroup is a helper method to define mock.On call
- ctx context.Context
- grpID uuid.UUID
func (*MockClient_Expecter) GetGroupById ¶
func (_e *MockClient_Expecter) GetGroupById(ctx interface{}, id interface{}) *MockClient_GetGroupById_Call
GetGroupById is a helper method to define mock.On call
- ctx context.Context
- id uuid.UUID
func (*MockClient_Expecter) GetOrCreateGroup ¶
func (_e *MockClient_Expecter) GetOrCreateGroup(ctx interface{}, existingGroupID interface{}, name interface{}, description interface{}) *MockClient_GetOrCreateGroup_Call
GetOrCreateGroup is a helper method to define mock.On call
- ctx context.Context
- existingGroupID *uuid.UUID
- name string
- description string
func (*MockClient_Expecter) GetUser ¶
func (_e *MockClient_Expecter) GetUser(ctx interface{}, email interface{}) *MockClient_GetUser_Call
GetUser is a helper method to define mock.On call
- ctx context.Context
- email string
func (*MockClient_Expecter) ListGroupMembers ¶
func (_e *MockClient_Expecter) ListGroupMembers(ctx interface{}, grp interface{}) *MockClient_ListGroupMembers_Call
ListGroupMembers is a helper method to define mock.On call
- ctx context.Context
- grp *Group
func (*MockClient_Expecter) ListGroupOwners ¶
func (_e *MockClient_Expecter) ListGroupOwners(ctx interface{}, grp interface{}) *MockClient_ListGroupOwners_Call
ListGroupOwners is a helper method to define mock.On call
- ctx context.Context
- grp *Group
func (*MockClient_Expecter) RemoveMemberFromGroup ¶
func (_e *MockClient_Expecter) RemoveMemberFromGroup(ctx interface{}, grp interface{}, member interface{}) *MockClient_RemoveMemberFromGroup_Call
RemoveMemberFromGroup is a helper method to define mock.On call
- ctx context.Context
- grp *Group
- member *Member
type MockClient_GetGroupById_Call ¶
MockClient_GetGroupById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupById'
func (*MockClient_GetGroupById_Call) Return ¶
func (_c *MockClient_GetGroupById_Call) Return(_a0 *Group, _a1 error) *MockClient_GetGroupById_Call
func (*MockClient_GetGroupById_Call) Run ¶
func (_c *MockClient_GetGroupById_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockClient_GetGroupById_Call
func (*MockClient_GetGroupById_Call) RunAndReturn ¶
func (_c *MockClient_GetGroupById_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*Group, error)) *MockClient_GetGroupById_Call
type MockClient_GetOrCreateGroup_Call ¶
MockClient_GetOrCreateGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrCreateGroup'
func (*MockClient_GetOrCreateGroup_Call) Return ¶
func (_c *MockClient_GetOrCreateGroup_Call) Return(_a0 *Group, _a1 bool, _a2 error) *MockClient_GetOrCreateGroup_Call
func (*MockClient_GetOrCreateGroup_Call) Run ¶
func (_c *MockClient_GetOrCreateGroup_Call) Run(run func(ctx context.Context, existingGroupID *uuid.UUID, name string, description string)) *MockClient_GetOrCreateGroup_Call
func (*MockClient_GetOrCreateGroup_Call) RunAndReturn ¶
type MockClient_GetUser_Call ¶
MockClient_GetUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUser'
func (*MockClient_GetUser_Call) Return ¶
func (_c *MockClient_GetUser_Call) Return(_a0 *Member, _a1 error) *MockClient_GetUser_Call
func (*MockClient_GetUser_Call) Run ¶
func (_c *MockClient_GetUser_Call) Run(run func(ctx context.Context, email string)) *MockClient_GetUser_Call
func (*MockClient_GetUser_Call) RunAndReturn ¶
func (_c *MockClient_GetUser_Call) RunAndReturn(run func(context.Context, string) (*Member, error)) *MockClient_GetUser_Call
type MockClient_ListGroupMembers_Call ¶
MockClient_ListGroupMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroupMembers'
func (*MockClient_ListGroupMembers_Call) Return ¶
func (_c *MockClient_ListGroupMembers_Call) Return(_a0 []*Member, _a1 error) *MockClient_ListGroupMembers_Call
func (*MockClient_ListGroupMembers_Call) Run ¶
func (_c *MockClient_ListGroupMembers_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_ListGroupMembers_Call
func (*MockClient_ListGroupMembers_Call) RunAndReturn ¶
func (_c *MockClient_ListGroupMembers_Call) RunAndReturn(run func(context.Context, *Group) ([]*Member, error)) *MockClient_ListGroupMembers_Call
type MockClient_ListGroupOwners_Call ¶
MockClient_ListGroupOwners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroupOwners'
func (*MockClient_ListGroupOwners_Call) Return ¶
func (_c *MockClient_ListGroupOwners_Call) Return(_a0 []*Member, _a1 error) *MockClient_ListGroupOwners_Call
func (*MockClient_ListGroupOwners_Call) Run ¶
func (_c *MockClient_ListGroupOwners_Call) Run(run func(ctx context.Context, grp *Group)) *MockClient_ListGroupOwners_Call
func (*MockClient_ListGroupOwners_Call) RunAndReturn ¶
func (_c *MockClient_ListGroupOwners_Call) RunAndReturn(run func(context.Context, *Group) ([]*Member, error)) *MockClient_ListGroupOwners_Call
type MockClient_RemoveMemberFromGroup_Call ¶
MockClient_RemoveMemberFromGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveMemberFromGroup'
func (*MockClient_RemoveMemberFromGroup_Call) Return ¶
func (_c *MockClient_RemoveMemberFromGroup_Call) Return(_a0 error) *MockClient_RemoveMemberFromGroup_Call
func (*MockClient_RemoveMemberFromGroup_Call) Run ¶
func (_c *MockClient_RemoveMemberFromGroup_Call) Run(run func(ctx context.Context, grp *Group, member *Member)) *MockClient_RemoveMemberFromGroup_Call
func (*MockClient_RemoveMemberFromGroup_Call) RunAndReturn ¶
func (_c *MockClient_RemoveMemberFromGroup_Call) RunAndReturn(run func(context.Context, *Group, *Member) error) *MockClient_RemoveMemberFromGroup_Call