Documentation
¶
Index ¶
- Constants
- func Marshal[T any](data T) (io.Reader, error)
- func Unmarshal[T any](data io.ReadCloser) (T, error)
- type Client
- func (client *Client) CreateTeam(ctx context.Context, team Team) (Team, error)
- func (client *Client) DeleteTeam(ctx context.Context, id int) error
- func (client *Client) ErrorFromResponse(response *http.Response) error
- func (client *Client) GetTeamById(ctx context.Context, id int) (Team, error)
- func (client *Client) GetTeamURL(id int) string
- func (client *Client) GetTeamsURL() string
- func (client *Client) GetUserIDByEmail(ctx context.Context, userRoles []UserRoles) ([]UserRoles, error)
- func (client *Client) GetUsersLightURL() string
- func (client *Client) UpdateTeam(ctx context.Context, team Team) (Team, error)
- type ClientOption
- type Common
- type EntryPoint
- type Monitor
- type Requester
- type Secure
- type SysdigRequest
- type Team
- type TeamInterface
- type UserRoles
- type UsersList
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" ContentTypeHeader = "Content-Type" ContentTypeJSON = "application/json" )
View Source
const ( GetUsersPath = "%s/api/users/light" GetTeamsPath = "%s/api/teams" GetTeamPath = "%s/api/teams/%d" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateTeam ¶
func (*Client) ErrorFromResponse ¶
func (*Client) GetTeamById ¶
func (*Client) GetTeamURL ¶
func (*Client) GetTeamsURL ¶
func (*Client) GetUserIDByEmail ¶
func (*Client) GetUsersLightURL ¶
type ClientOption ¶
type ClientOption func(c *config)
func WithExtraHeaders ¶
func WithExtraHeaders(headers map[string]string) ClientOption
func WithInsecure ¶
func WithInsecure(insecure bool) ClientOption
func WithToken ¶
func WithToken(token string) ClientOption
func WithURL ¶
func WithURL(url string) ClientOption
type Common ¶
type Common interface {
TeamInterface
}
type EntryPoint ¶
type Monitor ¶
type Monitor interface {
Common
}
func NewMonitor ¶
func NewMonitor(opts ...ClientOption) Monitor
type Secure ¶
type Secure interface {
Common
}
func NewSecure ¶
func NewSecure(opts ...ClientOption) Secure
type SysdigRequest ¶ added in v0.7.3
type SysdigRequest struct {
// contains filtered or unexported fields
}
type Team ¶
type Team struct {
UserRoles []UserRoles `json:"userRoles,omitempty"`
Description string `json:"description"`
Name string `json:"name"`
ID int `json:"id,omitempty"`
Version int `json:"version,omitempty"`
Origin string `json:"origin,omitempty"`
LastUpdated int64 `json:"lastUpdated,omitempty"`
EntryPoint *EntryPoint `json:"entryPoint,omitempty"`
Theme string `json:"theme"`
CustomerID int `json:"customerId,omitempty"`
DateCreated int64 `json:"dateCreated,omitempty"`
Products []string `json:"products,omitempty"`
Show string `json:"show,omitempty"`
Immutable bool `json:"immutable,omitempty"`
CanUseSysdigCapture *bool `json:"canUseSysdigCapture,omitempty"`
CanUseCustomEvents *bool `json:"canUseCustomEvents,omitempty"`
CanUseAwsMetrics *bool `json:"canUseAwsMetrics,omitempty"`
CanUseBeaconMetrics *bool `json:"canUseBeaconMetrics,omitempty"`
UserCount int `json:"userCount,omitempty"`
Filter string `json:"filter,omitempty"`
DefaultTeam bool `json:"default,omitempty"`
}
type TeamInterface ¶
type TeamInterface interface {
GetUserIDByEmail(ctx context.Context, userRoles []UserRoles) ([]UserRoles, error)
GetTeamById(ctx context.Context, id int) (t Team, err error)
CreateTeam(ctx context.Context, tRequest Team) (t Team, err error)
UpdateTeam(ctx context.Context, tRequest Team) (t Team, err error)
DeleteTeam(ctx context.Context, id int) error
}
Click to show internal directories.
Click to hide internal directories.