Documentation ¶
Index ¶
- Constants
- type ACL
- type Application
- type BaseResource
- type Capability
- type Client
- func (c *Client) CreateUrl(endpoint string) string
- func (c *Client) GetApplication(ctx context.Context, applicationName string) (*Application, error)
- func (c *Client) GetApplications(ctx context.Context, getApplicationsVars PaginationVars) ([]Application, string, error)
- func (c *Client) GetCapabilities(ctx context.Context, getCapabilitiesVars PaginationVars) ([]Capability, string, error)
- func (c *Client) GetRole(ctx context.Context, roleId string) (*Role, error)
- func (c *Client) GetRoles(ctx context.Context, getRolesVars PaginationVars) ([]Role, string, error)
- func (c *Client) GetUser(ctx context.Context, userId string) (*User, error)
- func (c *Client) GetUsers(ctx context.Context, getUsersVars PaginationVars) ([]User, string, error)
- func (c *Client) GetUsersByRole(ctx context.Context, getUsersVars PaginationVars, role string) ([]User, string, error)
- func (c *Client) IsCloudPlatform() bool
- func (c *Client) PointToDeployment(deployment string)
- func (c *Client) PointToLocalhost()
- func (c *Client) ResetPointer()
- func (c *Client) UpdateRoleCapabilities(ctx context.Context, roleId string, capabilities []string) error
- func (c *Client) UpdateUserRoles(ctx context.Context, userId string, roles []string) error
- type PaginationData
- type PaginationVars
- type Response
- type Role
- type User
Constants ¶
View Source
const ( Localhost = "localhost" BaseURL = "https://%s:8089" CloudBaseURL = "https://%s.splunkcloud.com:8089" UsersBaseURL = "/services/authentication/users" UserBaseURL = "/services/authentication/users/%s" RolesBaseURL = "/services/authorization/roles" RoleBaseURL = "/services/authorization/roles/%s" CapabilitiesBaseURL = "/services/authorization/grantable_capabilities/capabilities" ApplicationsBaseURL = "/services/apps/local" ApplicationBaseURL = "/services/apps/local/%s" RolesField = "roles" CapabilitiesField = "capabilities" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { BaseResource Name string `json:"name"` Author string `json:"author"` Content struct { Description string `json:"description"` } `json:"content"` }
type BaseResource ¶
type Capability ¶
type Capability struct { BaseResource Name string `json:"name"` Content struct { Capabilities []string `json:"capabilities"` } `json:"content"` }
type Client ¶
type Client struct { Auth string Cloud bool Deployment string // contains filtered or unexported fields }
func (*Client) GetApplication ¶
GetApplication returns specific application under Splunk instance.
func (*Client) GetApplications ¶
func (c *Client) GetApplications(ctx context.Context, getApplicationsVars PaginationVars) ([]Application, string, error)
GetApplications returns all applications under specific Splunk instance.
func (*Client) GetCapabilities ¶
func (c *Client) GetCapabilities(ctx context.Context, getCapabilitiesVars PaginationVars) ([]Capability, string, error)
GetCapabilities returns all grantable capabilities under specific Splunk instance.
func (*Client) GetRole ¶ added in v0.0.2
GetRole returns information regarding one specific role under Splunk instance.
func (*Client) GetUser ¶ added in v0.0.2
GetUser returns information regarding one specific user under Splunk instance.
func (*Client) GetUsersByRole ¶
func (c *Client) GetUsersByRole(ctx context.Context, getUsersVars PaginationVars, role string) ([]User, string, error)
GetUsersByRole returns all users in some specific role under one Splunk instance.
func (*Client) IsCloudPlatform ¶
func (*Client) PointToDeployment ¶
func (*Client) PointToLocalhost ¶
func (c *Client) PointToLocalhost()
func (*Client) ResetPointer ¶
func (c *Client) ResetPointer()
type PaginationData ¶
type PaginationVars ¶
type Response ¶
type Response[T any] struct { Values []T `json:"entry"` PaginationData `json:"paging"` }
Click to show internal directories.
Click to hide internal directories.