common

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SysdigCommonClient

type SysdigCommonClient interface {
	CreateUser(context.Context, *User) (*User, error)
	GetUserById(context.Context, int) (*User, error)
	GetUserByEmail(context.Context, string) (*User, error)
	DeleteUser(context.Context, int) error
	UpdateUser(context.Context, *User) (*User, error)
	GetCurrentUser(context.Context) (*User, error)
}

func NewSysdigCommonClient

func NewSysdigCommonClient(sysdigAPIToken string, url string, insecure bool) SysdigCommonClient

func WithExtraHeaders

func WithExtraHeaders(client SysdigCommonClient, extraHeaders map[string]string) SysdigCommonClient

type User

type User struct {
	ID         int    `json:"id,omitempty"`
	Version    int    `json:"version,omitempty"`
	SystemRole string `json:"systemRole,omitempty"`
	Email      string `json:"username"`
	FirstName  string `json:"firstName,omitempty"`
	LastName   string `json:"lastName,omitempty"`
}

-------- User --------

func UserFromJSON

func UserFromJSON(body []byte) User

func (*User) ToJSON

func (u *User) ToJSON() io.Reader

Jump to

Keyboard shortcuts

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