shield

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

README

Shield

Shield is a cloud-native role-based authorization-aware reverse-proxy service that helps you manage the authorization of given resources. With Shield, you can create groups and manage members, manage policies of the resources.

Usage

sinks:
  name: shield
  config:
    host: shield.com
    headers:
      X-Shield-Email: meteor@gotocompany.com
      X-Other-Header: value1, value2

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

func New

func New(c Client, logger log.Logger) plugins.Syncer

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"`
	Headers map[string]string `mapstructure:"headers"`
}

type RequestPayload

type RequestPayload struct {
	Name     string                 `json:"name"`
	Email    string                 `json:"email"`
	Metadata map[string]interface{} `json:"metadata"`
}

type Sink

type Sink struct {
	plugins.BasePlugin
	// contains filtered or unexported fields
}

func (*Sink) Close

func (s *Sink) Close() (err error)

func (*Sink) Init

func (s *Sink) Init(ctx context.Context, config plugins.Config) error

func (*Sink) Sink

func (s *Sink) Sink(ctx context.Context, batch []models.Record) error

Jump to

Keyboard shortcuts

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