client

package
v1.0.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

View Source
const StateAlwaysDelete = 0x02
View Source
const StateCreateIfNecessary = 0x01

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Url                    string
	Transport              *http.Transport
	ResourceOwner          string
	RoleMetaResourceState  int
	GroupMetaResourceState int
}

func NewClient

func NewClient(zmsConfig *ZmsConfig) (*Client, error)

func (Client) DeleteAssertionPolicyVersion

func (c Client) DeleteAssertionPolicyVersion(domainName string, policyName string, version string, assertionId int64, auditRef string) error

func (Client) DeleteGroup

func (c Client) DeleteGroup(domain string, groupName string, auditRef string) error

func (Client) DeleteGroupMembership

func (c Client) DeleteGroupMembership(domain string, groupName string, member zms.GroupMemberName, auditRef string) error

func (Client) DeleteMembership

func (c Client) DeleteMembership(domain string, roleMember string, member zms.MemberName, auditRef string) error

func (Client) DeletePolicy

func (c Client) DeletePolicy(domain string, policyName string, auditRef string) error

func (Client) DeletePolicyVersion

func (c Client) DeletePolicyVersion(domainName string, policyName string, version string, auditRef string) error

func (Client) DeleteRole

func (c Client) DeleteRole(domain string, roleName string, auditRef string) error

func (Client) DeleteServiceIdentity

func (c Client) DeleteServiceIdentity(domain string, serviceName string, auditRef string) error

func (Client) DeleteSubDomain

func (c Client) DeleteSubDomain(parentDomain string, subDomainName string, auditRef string) error

func (Client) DeleteTopLevelDomain

func (c Client) DeleteTopLevelDomain(name string, auditRef string) error

func (Client) DeleteUserDomain

func (c Client) DeleteUserDomain(domainName string, auditRef string) error

func (Client) GetDomain

func (c Client) GetDomain(domainName string) (*zms.Domain, error)

func (Client) GetGroup

func (c Client) GetGroup(domain string, groupName string) (*zms.Group, error)

func (Client) GetGroupMetaResourceState added in v1.0.39

func (c Client) GetGroupMetaResourceState(groupMetaResourceState, requestedState int) bool

func (Client) GetGroups

func (c Client) GetGroups(domainName string, members *bool) (*zms.Groups, error)

func (Client) GetPolicies

func (c Client) GetPolicies(domainName string, assertions bool, includeNonActive bool) (*zms.Policies, error)

func (Client) GetPolicy

func (c Client) GetPolicy(domain string, policy string) (*zms.Policy, error)

func (Client) GetPolicyList

func (c Client) GetPolicyList(domainName string, limit *int32, skip string) (*zms.PolicyList, error)

func (Client) GetPolicyVersion

func (c Client) GetPolicyVersion(domainName string, policyName string, version string) (*zms.Policy, error)

func (Client) GetPolicyVersionList

func (c Client) GetPolicyVersionList(domainName string, policyName string) (*zms.PolicyList, error)

func (Client) GetRole

func (c Client) GetRole(domain string, roleName string) (*zms.Role, error)

func (Client) GetRoleList

func (c Client) GetRoleList(domainName string, limit *int32, skip string) (*zms.RoleList, error)

func (Client) GetRoleMetaResourceState added in v1.0.39

func (c Client) GetRoleMetaResourceState(roleMetaResourceState, requestedState int) bool

func (Client) GetRoles

func (c Client) GetRoles(domainName string, members *bool, tagKey string, tagValue string) (*zms.Roles, error)

func (Client) GetServiceIdentity

func (c Client) GetServiceIdentity(domain string, serviceName string) (*zms.ServiceIdentity, error)

func (Client) GetServiceIdentityList

func (c Client) GetServiceIdentityList(domainName string, limit *int32, skip string) (*zms.ServiceIdentityList, error)

func (Client) PostSubDomain

func (c Client) PostSubDomain(parentDomain string, auditRef string, detail *zms.SubDomain) (*zms.Domain, error)

func (Client) PostTopLevelDomain

func (c Client) PostTopLevelDomain(auditRef string, detail *zms.TopLevelDomain) (*zms.Domain, error)

func (Client) PostUserDomain

func (c Client) PostUserDomain(domainName string, auditRef string, detail *zms.UserDomain) (*zms.Domain, error)

func (Client) PutAssertionConditions added in v1.0.32

func (c Client) PutAssertionConditions(domainName string, policyName string, assertionId int64, auditRef string, assertionConditions *zms.AssertionConditions) (*zms.AssertionConditions, error)

func (Client) PutAssertionPolicyVersion

func (c Client) PutAssertionPolicyVersion(domainName string, policyName string, version string, auditRef string, assertion *zms.Assertion) (*zms.Assertion, error)

func (Client) PutDomainMeta

func (c Client) PutDomainMeta(name string, auditRef string, detail *zms.DomainMeta) error

func (Client) PutGroup

func (c Client) PutGroup(domain string, groupName string, auditRef string, group *zms.Group) error

func (Client) PutGroupMembership

func (c Client) PutGroupMembership(domain string, groupName string, memberName zms.GroupMemberName, auditRef string, membership *zms.GroupMembership) error

func (Client) PutGroupMeta added in v1.0.30

func (c Client) PutGroupMeta(domain string, groupName string, auditRef string, groupMeta *zms.GroupMeta) error

func (Client) PutMembership

func (c Client) PutMembership(domain string, roleName string, memberName zms.MemberName, auditRef string, membership *zms.Membership) error

func (Client) PutPolicy

func (c Client) PutPolicy(domain string, policyName string, auditRef string, policy *zms.Policy) error

func (Client) PutPolicyVersion

func (c Client) PutPolicyVersion(domainName string, policyName string, policyOptions *zms.PolicyOptions, auditRef string) error

func (Client) PutRole

func (c Client) PutRole(domain string, roleName string, auditRef string, role *zms.Role) error

func (Client) PutRoleMeta added in v1.0.36

func (c Client) PutRoleMeta(domain string, roleName string, auditRef string, roleMeta *zms.RoleMeta) error

func (Client) PutServiceIdentity

func (c Client) PutServiceIdentity(domain string, serviceName string, auditRef string, detail *zms.ServiceIdentity) error

func (Client) SetActivePolicyVersion

func (c Client) SetActivePolicyVersion(domainName string, policyName string, policyOptions *zms.PolicyOptions, auditRef string) error

type MockZmsClient

type MockZmsClient struct {
	// contains filtered or unexported fields
}

MockZmsClient is a mock of ZmsClient interface.

func NewMockZmsClient

func NewMockZmsClient(ctrl *gomock.Controller) *MockZmsClient

NewMockZmsClient creates a new mock instance.

func (*MockZmsClient) DeleteGroup

func (m *MockZmsClient) DeleteGroup(domain, groupName, auditRef string) error

DeleteGroup mocks base method.

func (*MockZmsClient) DeleteGroupMembership

func (m *MockZmsClient) DeleteGroupMembership(domain, groupName string, member zms.GroupMemberName, auditRef string) error

DeleteGroupMembership mocks base method.

func (*MockZmsClient) DeleteMembership

func (m *MockZmsClient) DeleteMembership(domain, roleMember string, member zms.MemberName, auditRef string) error

DeleteMembership mocks base method.

func (*MockZmsClient) DeletePolicy

func (m *MockZmsClient) DeletePolicy(domain, policyName, auditRef string) error

DeletePolicy mocks base method.

func (*MockZmsClient) DeleteRole

func (m *MockZmsClient) DeleteRole(domain, roleName, auditRef string) error

DeleteRole mocks base method.

func (*MockZmsClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockZmsClient) GetGroup

func (m *MockZmsClient) GetGroup(domain, groupName string) (*zms.Group, error)

GetGroup mocks base method.

func (*MockZmsClient) GetPolicy

func (m *MockZmsClient) GetPolicy(domain, policy string) (*zms.Policy, error)

GetPolicy mocks base method.

func (*MockZmsClient) GetRole

func (m *MockZmsClient) GetRole(domain, roleName string) (*zms.Role, error)

GetRole mocks base method.

func (*MockZmsClient) PutGroup

func (m *MockZmsClient) PutGroup(domain, groupName, auditRef string, group *zms.Group) error

PutGroup mocks base method.

func (*MockZmsClient) PutGroupMembership

func (m *MockZmsClient) PutGroupMembership(domain, groupName string, memberName zms.GroupMemberName, auditRef string, membership *zms.GroupMembership) error

PutGroupMembership mocks base method.

func (*MockZmsClient) PutMembership

func (m *MockZmsClient) PutMembership(domain, roleName string, memberName zms.MemberName, auditRef string, membership *zms.Membership) error

PutMembership mocks base method.

func (*MockZmsClient) PutPolicy

func (m *MockZmsClient) PutPolicy(domain, policyName, auditRef string, policy *zms.Policy) error

PutPolicy mocks base method.

func (*MockZmsClient) PutRole

func (m *MockZmsClient) PutRole(domain, roleName, auditRef string, role *zms.Role) error

PutRole mocks base method.

type MockZmsClientMockRecorder

type MockZmsClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockZmsClientMockRecorder is the mock recorder for MockZmsClient.

func (*MockZmsClientMockRecorder) DeleteGroup

func (mr *MockZmsClientMockRecorder) DeleteGroup(domain, groupName, auditRef interface{}) *gomock.Call

DeleteGroup indicates an expected call of DeleteGroup.

func (*MockZmsClientMockRecorder) DeleteGroupMembership

func (mr *MockZmsClientMockRecorder) DeleteGroupMembership(domain, groupName, member, auditRef interface{}) *gomock.Call

DeleteGroupMembership indicates an expected call of DeleteGroupMembership.

func (*MockZmsClientMockRecorder) DeleteMembership

func (mr *MockZmsClientMockRecorder) DeleteMembership(domain, roleMember, member, auditRef interface{}) *gomock.Call

DeleteMembership indicates an expected call of DeleteMembership.

func (*MockZmsClientMockRecorder) DeletePolicy

func (mr *MockZmsClientMockRecorder) DeletePolicy(domain, policyName, auditRef interface{}) *gomock.Call

DeletePolicy indicates an expected call of DeletePolicy.

func (*MockZmsClientMockRecorder) DeleteRole

func (mr *MockZmsClientMockRecorder) DeleteRole(domain, roleName, auditRef interface{}) *gomock.Call

DeleteRole indicates an expected call of DeleteRole.

func (*MockZmsClientMockRecorder) GetGroup

func (mr *MockZmsClientMockRecorder) GetGroup(domain, groupName interface{}) *gomock.Call

GetGroup indicates an expected call of GetGroup.

func (*MockZmsClientMockRecorder) GetPolicy

func (mr *MockZmsClientMockRecorder) GetPolicy(domain, policy interface{}) *gomock.Call

GetPolicy indicates an expected call of GetPolicy.

func (*MockZmsClientMockRecorder) GetRole

func (mr *MockZmsClientMockRecorder) GetRole(domain, roleName interface{}) *gomock.Call

GetRole indicates an expected call of GetRole.

func (*MockZmsClientMockRecorder) PutGroup

func (mr *MockZmsClientMockRecorder) PutGroup(domain, groupName, auditRef, group interface{}) *gomock.Call

PutGroup indicates an expected call of PutGroup.

func (*MockZmsClientMockRecorder) PutGroupMembership

func (mr *MockZmsClientMockRecorder) PutGroupMembership(domain, groupName, memberName, auditRef, membership interface{}) *gomock.Call

PutGroupMembership indicates an expected call of PutGroupMembership.

func (*MockZmsClientMockRecorder) PutMembership

func (mr *MockZmsClientMockRecorder) PutMembership(domain, roleName, memberName, auditRef, membership interface{}) *gomock.Call

PutMembership indicates an expected call of PutMembership.

func (*MockZmsClientMockRecorder) PutPolicy

func (mr *MockZmsClientMockRecorder) PutPolicy(domain, policyName, auditRef, policy interface{}) *gomock.Call

PutPolicy indicates an expected call of PutPolicy.

func (*MockZmsClientMockRecorder) PutRole

func (mr *MockZmsClientMockRecorder) PutRole(domain, roleName, auditRef, role interface{}) *gomock.Call

PutRole indicates an expected call of PutRole.

type ZmsClient

type ZmsClient interface {
	GetRole(domain string, roleName string) (*zms.Role, error)
	DeleteRole(domain string, roleName string, auditRef string) error
	PutRole(domain string, roleName string, auditRef string, role *zms.Role) error
	PutMembership(domain string, roleName string, memberName zms.MemberName, auditRef string, membership *zms.Membership) error
	DeleteMembership(domain string, roleMember string, member zms.MemberName, auditRef string) error
	PutPolicy(domain string, policyName string, auditRef string, policy *zms.Policy) error
	GetPolicy(domain string, policy string) (*zms.Policy, error)
	DeletePolicy(domain string, policyName string, auditRef string) error
	GetGroup(domain string, groupName string) (*zms.Group, error)
	DeleteGroup(domain string, groupName string, auditRef string) error
	PutGroup(domain string, groupName string, auditRef string, group *zms.Group) error
	DeleteGroupMembership(domain string, groupName string, member zms.GroupMemberName, auditRef string) error
	PutGroupMembership(domain string, groupName string, memberName zms.GroupMemberName, auditRef string, membership *zms.GroupMembership) error
	GetServiceIdentity(domain string, serviceName string) (*zms.ServiceIdentity, error)
	PutServiceIdentity(domain string, serviceName string, auditRef string, detail *zms.ServiceIdentity) error
	DeleteServiceIdentity(domain string, serviceName string, auditRef string) error
	GetDomain(domainName string) (*zms.Domain, error)
	PostUserDomain(domainName string, auditRef string, detail *zms.UserDomain) (*zms.Domain, error)
	DeleteUserDomain(domainName string, auditRef string) error
	PostSubDomain(parentDomain string, auditRef string, detail *zms.SubDomain) (*zms.Domain, error)
	DeleteSubDomain(parentDomain string, subDomainName string, auditRef string) error
	PostTopLevelDomain(auditRef string, detail *zms.TopLevelDomain) (*zms.Domain, error)
	DeleteTopLevelDomain(name string, auditRef string) error
	PutDomainMeta(name string, auditRef string, detail *zms.DomainMeta) error
	GetRoleList(domainName string, limit *int32, skip string) (*zms.RoleList, error)
	GetPolicyList(domainName string, limit *int32, skip string) (*zms.PolicyList, error)
	GetServiceIdentityList(domainName string, limit *int32, skip string) (*zms.ServiceIdentityList, error)
	GetGroups(domainName string, members *bool) (*zms.Groups, error)
	GetRoles(domainName string, members *bool, tagKey string, tagValue string) (*zms.Roles, error)
	PutPolicyVersion(domainName string, policyName string, policyOptions *zms.PolicyOptions, auditRef string) error
	PutAssertionPolicyVersion(domainName string, policyName string, version string, auditRef string, assertion *zms.Assertion) (*zms.Assertion, error)
	GetPolicyVersion(domainName string, policyName string, version string) (*zms.Policy, error)
	SetActivePolicyVersion(domainName string, policyName string, policyOptions *zms.PolicyOptions, auditRef string) error
	GetPolicyVersionList(domainName string, policyName string) (*zms.PolicyList, error)
	DeletePolicyVersion(domainName string, policyName string, version string, auditRef string) error
	DeleteAssertionPolicyVersion(domainName string, policyName string, version string, assertionId int64, auditRef string) error
	PutAssertionConditions(domainName string, policyName string, assertionId int64, auditRef string, assertionConditions *zms.AssertionConditions) (*zms.AssertionConditions, error)
	GetPolicies(domainName string, assertions bool, includeNonActive bool) (*zms.Policies, error)
	PutGroupMeta(domain string, groupName string, auditRef string, group *zms.GroupMeta) error
	PutRoleMeta(domain string, roleName string, auditRef string, group *zms.RoleMeta) error
	GetRoleMetaResourceState(roleMetaResourceState, requestedState int) bool
	GetGroupMetaResourceState(groupMetaResourceState, requestedState int) bool
}

type ZmsConfig

type ZmsConfig struct {
	Url                    string
	Cert                   string
	Key                    string
	CaCert                 string
	ResourceOwner          string
	RoleMetaResourceState  int
	GroupMetaResourceState int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL