Documentation ¶
Overview ¶
SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: GPL-3.0-or-later
Index ¶
- Constants
- type ActionDescription
- type Authority
- type AuthorizationResult
- type Identity
- type ImplicitAuthorization
- type MockAuthority
- type MockInterfaceAuthority
- func (v *MockInterfaceAuthority) AuthenticationAgentResponse(flags dbus.Flags, cookie string, identity Identity) error
- func (v *MockInterfaceAuthority) AuthenticationAgentResponse2(flags dbus.Flags, uid uint32, cookie string, identity Identity) error
- func (v *MockInterfaceAuthority) BackendFeatures() proxy.PropUint32
- func (v *MockInterfaceAuthority) BackendName() proxy.PropString
- func (v *MockInterfaceAuthority) BackendVersion() proxy.PropString
- func (v *MockInterfaceAuthority) CancelCheckAuthorization(flags dbus.Flags, cancellation_id string) error
- func (v *MockInterfaceAuthority) CheckAuthorization(flags dbus.Flags, subject Subject, action_id string, details map[string]string, ...) (AuthorizationResult, error)
- func (v *MockInterfaceAuthority) ConnectChanged(cb func()) (dbusutil.SignalHandlerId, error)
- func (v *MockInterfaceAuthority) EnumerateActions(flags dbus.Flags, locale string) ([]ActionDescription, error)
- func (v *MockInterfaceAuthority) EnumerateTemporaryAuthorizations(flags dbus.Flags, subject Subject) (TemporaryAuthorization, error)
- func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse(flags dbus.Flags, ch chan *dbus.Call, cookie string, identity Identity) *dbus.Call
- func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse2(flags dbus.Flags, ch chan *dbus.Call, uid uint32, cookie string, ...) *dbus.Call
- func (v *MockInterfaceAuthority) GoCancelCheckAuthorization(flags dbus.Flags, ch chan *dbus.Call, cancellation_id string) *dbus.Call
- func (v *MockInterfaceAuthority) GoCheckAuthorization(flags dbus.Flags, ch chan *dbus.Call, subject Subject, action_id string, ...) *dbus.Call
- func (v *MockInterfaceAuthority) GoEnumerateActions(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call
- func (v *MockInterfaceAuthority) GoEnumerateTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call
- func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, ...) *dbus.Call
- func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgentWithOptions(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, ...) *dbus.Call
- func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizationById(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
- func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call
- func (v *MockInterfaceAuthority) GoUnregisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, object_path string) *dbus.Call
- func (v *MockInterfaceAuthority) RegisterAuthenticationAgent(flags dbus.Flags, subject Subject, locale string, object_path string) error
- func (v *MockInterfaceAuthority) RegisterAuthenticationAgentWithOptions(flags dbus.Flags, subject Subject, locale string, object_path string, ...) error
- func (v *MockInterfaceAuthority) RevokeTemporaryAuthorizationById(flags dbus.Flags, id string) error
- func (v *MockInterfaceAuthority) RevokeTemporaryAuthorizations(flags dbus.Flags, subject Subject) error
- func (v *MockInterfaceAuthority) UnregisterAuthenticationAgent(flags dbus.Flags, subject Subject, object_path string) error
- type Subject
- type TemporaryAuthorization
Constants ¶
View Source
const ( SubjectKindUnixProcess = "unix-process" SubjectKindUnixSession = "unix-session" SubjectKindSystemBusName = "system-bus-name" )
SubjectKind
View Source
const ( CheckAuthorizationFlagsNone = 0 CheckAuthorizationFlagsAllowUserInteraction = 1 )
CheckAuthorizationFlags
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionDescription ¶
type ActionDescription struct { ActionId string Description string Message string VendorName string VendorURL string IconName string ImplicitAny ImplicitAuthorization ImplicitInactive ImplicitAuthorization ImplicitActive ImplicitAuthorization }
type Authority ¶
func NewAuthority ¶
func NewAuthority(conn *dbus.Conn) Authority
type AuthorizationResult ¶
type ImplicitAuthorization ¶
type ImplicitAuthorization uint32
type MockAuthority ¶
type MockAuthority struct { MockInterfaceAuthority // interface org.freedesktop.PolicyKit1.Authority proxy.MockObject }
type MockInterfaceAuthority ¶
func (*MockInterfaceAuthority) AuthenticationAgentResponse ¶
func (v *MockInterfaceAuthority) AuthenticationAgentResponse(flags dbus.Flags, cookie string, identity Identity) error
func (*MockInterfaceAuthority) AuthenticationAgentResponse2 ¶
func (v *MockInterfaceAuthority) AuthenticationAgentResponse2(flags dbus.Flags, uid uint32, cookie string, identity Identity) error
func (*MockInterfaceAuthority) BackendFeatures ¶
func (v *MockInterfaceAuthority) BackendFeatures() proxy.PropUint32
func (*MockInterfaceAuthority) BackendName ¶
func (v *MockInterfaceAuthority) BackendName() proxy.PropString
func (*MockInterfaceAuthority) BackendVersion ¶
func (v *MockInterfaceAuthority) BackendVersion() proxy.PropString
func (*MockInterfaceAuthority) CancelCheckAuthorization ¶
func (v *MockInterfaceAuthority) CancelCheckAuthorization(flags dbus.Flags, cancellation_id string) error
func (*MockInterfaceAuthority) CheckAuthorization ¶
func (v *MockInterfaceAuthority) CheckAuthorization(flags dbus.Flags, subject Subject, action_id string, details map[string]string, flags0 uint32, cancellation_id string) (AuthorizationResult, error)
func (*MockInterfaceAuthority) ConnectChanged ¶
func (v *MockInterfaceAuthority) ConnectChanged(cb func()) (dbusutil.SignalHandlerId, error)
func (*MockInterfaceAuthority) EnumerateActions ¶
func (v *MockInterfaceAuthority) EnumerateActions(flags dbus.Flags, locale string) ([]ActionDescription, error)
func (*MockInterfaceAuthority) EnumerateTemporaryAuthorizations ¶
func (v *MockInterfaceAuthority) EnumerateTemporaryAuthorizations(flags dbus.Flags, subject Subject) (TemporaryAuthorization, error)
func (*MockInterfaceAuthority) GoAuthenticationAgentResponse ¶
func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse(flags dbus.Flags, ch chan *dbus.Call, cookie string, identity Identity) *dbus.Call
func (*MockInterfaceAuthority) GoAuthenticationAgentResponse2 ¶
func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse2(flags dbus.Flags, ch chan *dbus.Call, uid uint32, cookie string, identity Identity) *dbus.Call
func (*MockInterfaceAuthority) GoCancelCheckAuthorization ¶
func (v *MockInterfaceAuthority) GoCancelCheckAuthorization(flags dbus.Flags, ch chan *dbus.Call, cancellation_id string) *dbus.Call
func (*MockInterfaceAuthority) GoCheckAuthorization ¶
func (*MockInterfaceAuthority) GoEnumerateActions ¶
func (v *MockInterfaceAuthority) GoEnumerateActions(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call
func (*MockInterfaceAuthority) GoEnumerateTemporaryAuthorizations ¶
func (v *MockInterfaceAuthority) GoEnumerateTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call
func (*MockInterfaceAuthority) GoRegisterAuthenticationAgent ¶
func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, object_path string) *dbus.Call
func (*MockInterfaceAuthority) GoRegisterAuthenticationAgentWithOptions ¶
func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgentWithOptions(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, object_path string, options map[string]dbus.Variant) *dbus.Call
func (*MockInterfaceAuthority) GoRevokeTemporaryAuthorizationById ¶
func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizationById(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
func (*MockInterfaceAuthority) GoRevokeTemporaryAuthorizations ¶
func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call
func (*MockInterfaceAuthority) GoUnregisterAuthenticationAgent ¶
func (v *MockInterfaceAuthority) GoUnregisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, object_path string) *dbus.Call
func (*MockInterfaceAuthority) RegisterAuthenticationAgent ¶
func (v *MockInterfaceAuthority) RegisterAuthenticationAgent(flags dbus.Flags, subject Subject, locale string, object_path string) error
func (*MockInterfaceAuthority) RegisterAuthenticationAgentWithOptions ¶
func (*MockInterfaceAuthority) RevokeTemporaryAuthorizationById ¶
func (v *MockInterfaceAuthority) RevokeTemporaryAuthorizationById(flags dbus.Flags, id string) error
func (*MockInterfaceAuthority) RevokeTemporaryAuthorizations ¶
func (v *MockInterfaceAuthority) RevokeTemporaryAuthorizations(flags dbus.Flags, subject Subject) error
func (*MockInterfaceAuthority) UnregisterAuthenticationAgent ¶
func (v *MockInterfaceAuthority) UnregisterAuthenticationAgent(flags dbus.Flags, subject Subject, object_path string) error
type Subject ¶
func MakeSubject ¶
Click to show internal directories.
Click to hide internal directories.