sdk

package
v1.53.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SortCreated  sortParam = "created"
	SortName     sortParam = "name"
	SortNameAsc  sortParam = "name:asc"
	SortNameDesc sortParam = "name:desc"
)

Functions

This section is empty.

Types

type Client

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

func New

func New(identityAPIURL string) *Client

New creates a new instance of Client with a given topic api url

func NewWithHealthClient

func NewWithHealthClient(hcCli *healthcheck.Client) *Client

NewWithHealthClient creates a new instance of topic API Client, reusing the URL and Clienter from the provided healthcheck client

func (*Client) Checker

func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls identity api health endpoint and returns a check object to the caller

func (*Client) GetGroup added in v1.53.0

func (cli *Client) GetGroup(ctx context.Context, id string) (*GroupsResponse, apiError.Error)

GetGroup gets a single group by its ID

func (*Client) GetGroups added in v1.53.0

func (cli *Client) GetGroups(ctx context.Context, sort *sortParam) (*GroupsResponse, apiError.Error)

GetGroups gets a list of groups

func (*Client) GetGroupsReport added in v1.53.0

func (cli *Client) GetGroupsReport(ctx context.Context) (*GroupsReportResponse, apiError.Error)

GetGroupsReport gets a list of groups-report

func (*Client) GetToken

func (cli *Client) GetToken(ctx context.Context, credentials models.UserSignIn) (*TokenResponse, apiError.Error)

GetToken attempts to sign in and obtain a JWT token from the API

func (*Client) Health

func (cli *Client) Health() *healthcheck.Client

Health returns the underlying Healthcheck Client for this identity API client

func (*Client) URL

func (cli *Client) URL() string

URL returns the URL used by this client

type Group added in v1.53.0

type Group struct {
	ID         string    `json:"id"`
	Name       string    `json:"name"`
	Precedence int       `json:"precedence"`
	Created    time.Time `json:"created"`
}

type GroupResponse added in v1.53.0

type GroupResponse struct {
	Group Group `json:"group"`
}

type GroupsReportItem added in v1.53.0

type GroupsReportItem struct {
	Group string `json:"group"`
	User  string `json:"user"`
}

GroupsReportItem represents an item in the /groups-report response.

type GroupsReportResponse added in v1.53.0

type GroupsReportResponse []GroupsReportItem

GroupsReportResponse represents the response structure containing a list of GroupsReportItems.

type GroupsResponse added in v1.53.0

type GroupsResponse struct {
	Groups []Group
	Count  int
}

type ResponseInfo

type ResponseInfo struct {
	Body    []byte
	Headers http.Header
	Status  int
}

type TokenResponse

type TokenResponse struct {
	Token                      string `json:"-"`
	RefreshToken               string `json:"-"`
	ExpirationTime             string `json:"expirationTime"`
	RefreshTokenExpirationTime string `json:"refreshTokenExpirationTime"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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