authentication_groups

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 5 Imported by: 2

README

Authentication Groups

Compatible with Logz.io's Authentication Groups API.

This is an example to a request that creates a new authentication group:

client, _ := authentication_groups.New(apiToken, apiServerAddress)
groups, err := client.PostAuthenticationGroups(
	    []authentication_groups.AuthenticationGroup{
            {
            Group: "test_group_admin",
            UserRole: authentication_groups.AuthGroupsUserRoleAdmin,
            }})
function func name
post request to create, update or delete user groups func (c *AuthenticationGroupsClient) PostAuthenticationGroups(groups []AuthenticationGroup) ([]AuthenticationGroup, error)
get authentication groups func (c *AuthenticationGroupsClient) GetAuthenticationGroups() ([]AuthenticationGroup, error)

Documentation

Index

Constants

View Source
const (
	AuthGroupsUserRoleReadonly = "USER_ROLE_READONLY"
	AuthGroupsUserRoleRegular  = "USER_ROLE_REGULAR"
	AuthGroupsUserRoleAdmin    = "USER_ROLE_ACCOUNT_ADMIN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationGroup

type AuthenticationGroup struct {
	Group    string `json:"group"`
	UserRole string `json:"userRole"`
}

type AuthenticationGroupsClient

type AuthenticationGroupsClient struct {
	*client.Client
}

func New

func New(apiToken string, baseUrl string) (*AuthenticationGroupsClient, error)

New Creates a new entry point into the authentication groups functions, accepts the user's logz.io API token and base url

func (*AuthenticationGroupsClient) GetAuthenticationGroups

func (c *AuthenticationGroupsClient) GetAuthenticationGroups() ([]AuthenticationGroup, error)

GetAuthenticationGroups returns all authentication groups, or error if occurred

func (*AuthenticationGroupsClient) PostAuthenticationGroups

func (c *AuthenticationGroupsClient) PostAuthenticationGroups(groups []AuthenticationGroup) ([]AuthenticationGroup, error)

PostAuthenticationGroups receives a list of authentication groups and generates a request to Logz.io

Jump to

Keyboard shortcuts

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