users

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserServiceEnv = "USER_SVC_URL"
	// DefaultURL server URL for the API
	DefaultURL = "https://api.ctpx.secureworks.com/graphql"
	// DefaultFields that the API can respond with, can be permanently set at the package
	// or used as an example to define your own
	DefaultFields graphql.ResponseFields = `` /* 221-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type EulaOutput

type EulaOutput struct {
	Date    time.Time `json:"date"`
	Version string    `json:"version"`
}

type FindUsersInput

type FindUsersInput struct {
	Email    string
	Role     string
	TenantID string
	Status   string
	Page     int
	PerPage  int
}

type GetUserInput

type GetUserInput struct {
	ID string
}

type IUserSvc

func NewUserSvc

func NewUserSvc(c *client.Client) IUserSvc

NewNotificationSvc takes a client from `client` package -- see examples/notifications.go for an example

type TenantOutput

type TenantOutput struct {
	ID string `json:"id"`
}

type TenantV2Output

type TenantV2Output struct {
	ID   string `json:"id"`
	Role string `json:"role"`
}

type UserOutput

type UserOutput struct {
	ID              string           `json:"id"`
	UserID          string           `json:"user_id"`
	CreatedAt       time.Time        `json:"created_at"`
	UpdatedAt       time.Time        `json:"updated_at"`
	LastLogin       nulls.Time       `json:"last_login"`
	Status          string           `json:"status"`
	Email           string           `json:"email"`
	EmailNormalized string           `json:"email_normalized"`
	FamilyName      nulls.String     `json:"family_name"`
	GivenName       nulls.String     `json:"given_name"`
	PhoneNumber     nulls.String     `json:"phone_number"`
	Roles           []string         `json:"roles"`
	Tenants         []TenantOutput   `json:"tenants"`
	TenantsV2       []TenantV2Output `json:"tenants_v2"`
	Eula            *EulaOutput      `json:"eula,omitempty"`
	Timezone        nulls.String     `json:"timezone"`
}

type UserSvc

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

func (*UserSvc) FindUsers

func (u *UserSvc) FindUsers(in *FindUsersInput, rf graphql.ResponseFields, opts ...graphql.RequestOption) ([]*UserOutput, error)

func (*UserSvc) GetUser

Jump to

Keyboard shortcuts

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