shield

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

shield

Usage

source:
  type: shield
  config:
    host: shield.com:80

Inputs

Key Value Example Description
host string shield.com:80 Shield' GRPC host required

Outputs

Field Sample Value
resource.urn shield::https://shield-host.com/jonsnow
resource.name Jon Snow
resource.service shield
resource.type user
resource.description sample user description
email [email protected]
username jonsnow
full_name Jon Snow
status active
memberships.group_urn grpname:grpId
memberships.role rolename
timestamp.create_time 12432
timestamp.updatetime 90242

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

View Source
const (
	GRPCMaxClientSendSize      = 45 << 20 // 45MB
	GRPCMaxClientRecvSize      = 45 << 20 // 45MB
	GRPCMaxRetry          uint = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	sh.ShieldServiceClient
	Connect(ctx context.Context, host string) error
	Close() error
}

type Config

type Config struct {
	Host string `mapstructure:"host" validate:"required"`
}

Config holds the set of configuration for the shield extractor

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor manages the communication with the shield service

func New

func New(logger log.Logger, client Client) *Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error

Extract extracts the user information

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) (err error)

Init initializes the extractor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳