Documentation ¶
Index ¶
- func InstallPlugin(repoOwner, repoName, tokenName string) error
- func NewHCLogAdapter(l *logrus.Logger, name string) hclog.Logger
- type EIAMPlugin
- type EphemeralIamPlugin
- type GRPCClient
- type GRPCServer
- type HCLogAdapter
- func (h HCLogAdapter) Debug(msg string, args ...interface{})
- func (h HCLogAdapter) Error(msg string, args ...interface{})
- func (h HCLogAdapter) ImpliedArgs() []interface{}
- func (h HCLogAdapter) Info(msg string, args ...interface{})
- func (h HCLogAdapter) IsDebug() bool
- func (h HCLogAdapter) IsError() bool
- func (h HCLogAdapter) IsInfo() bool
- func (h HCLogAdapter) IsTrace() bool
- func (h HCLogAdapter) IsWarn() bool
- func (h HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
- func (h HCLogAdapter) Name() string
- func (h HCLogAdapter) Named(name string) hclog.Logger
- func (h HCLogAdapter) ResetNamed(name string) hclog.Logger
- func (h *HCLogAdapter) SetLevel(level hclog.Level)
- func (h HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (h HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (h HCLogAdapter) Trace(msg string, args ...interface{})
- func (h HCLogAdapter) Warn(msg string, args ...interface{})
- func (h HCLogAdapter) With(args ...interface{}) hclog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallPlugin ¶
InstallPlugin attempts to install an ephemeral-iam plugin from a given Github repo.
func NewHCLogAdapter ¶
NewHCLogAdapter takes an instance of a Logrus logger and returns an hclog logger in the form of an HCLogAdapter.
Types ¶
type EIAMPlugin ¶
EIAMPlugin is the interface that is exposed to external plugins to implement.
type EphemeralIamPlugin ¶
type EphemeralIamPlugin struct { Name string Description string Version string Client *hcplugin.Client Path string }
EphemeralIamPlugin holds the metadata of an installed plugin.
type GRPCClient ¶
type GRPCClient struct {
Client pb.EIAMPluginClient
}
func (*GRPCClient) GetInfo ¶
func (m *GRPCClient) GetInfo() (name, desc, version string, err error)
GetInfo is the gRPC method that is called to get metadata about a plugin.
func (*GRPCClient) Run ¶
func (m *GRPCClient) Run() error
Run is the gRPC method that is called to invoke a plugin's root command.
type GRPCServer ¶
type GRPCServer struct { pb.UnimplementedEIAMPluginServer Impl EIAMPlugin }
GRPCServer is the implementation of the go-plugin gRPC server.
func (*GRPCServer) GetInfo ¶
func (m *GRPCServer) GetInfo(ctx context.Context, req *pb.Empty) (*pb.PluginInfo, error)
GetInfo is the gRPC method that is called to get metadata about a plugin.
type HCLogAdapter ¶
type HCLogAdapter struct {
// contains filtered or unexported fields
}
HCLogAdapter implements the hclog interface. Plugins use hclog to send log entries back to ephemeral-iam and this adapter allows for those logs to be handled by ephemeral-iam's Logrus logger.
func (HCLogAdapter) Debug ¶
func (h HCLogAdapter) Debug(msg string, args ...interface{})
func (HCLogAdapter) Error ¶
func (h HCLogAdapter) Error(msg string, args ...interface{})
func (HCLogAdapter) ImpliedArgs ¶
func (h HCLogAdapter) ImpliedArgs() []interface{}
func (HCLogAdapter) Info ¶
func (h HCLogAdapter) Info(msg string, args ...interface{})
func (HCLogAdapter) IsDebug ¶
func (h HCLogAdapter) IsDebug() bool
func (HCLogAdapter) IsError ¶
func (h HCLogAdapter) IsError() bool
func (HCLogAdapter) IsInfo ¶
func (h HCLogAdapter) IsInfo() bool
func (HCLogAdapter) IsTrace ¶
func (h HCLogAdapter) IsTrace() bool
func (HCLogAdapter) IsWarn ¶
func (h HCLogAdapter) IsWarn() bool
func (HCLogAdapter) Log ¶
func (h HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
func (HCLogAdapter) Name ¶
func (h HCLogAdapter) Name() string
func (HCLogAdapter) Named ¶
func (h HCLogAdapter) Named(name string) hclog.Logger
func (HCLogAdapter) ResetNamed ¶
func (h HCLogAdapter) ResetNamed(name string) hclog.Logger
func (*HCLogAdapter) SetLevel ¶
func (h *HCLogAdapter) SetLevel(level hclog.Level)
func (HCLogAdapter) StandardLogger ¶
func (h HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
func (HCLogAdapter) StandardWriter ¶
func (h HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
func (HCLogAdapter) Trace ¶
func (h HCLogAdapter) Trace(msg string, args ...interface{})
func (HCLogAdapter) Warn ¶
func (h HCLogAdapter) Warn(msg string, args ...interface{})
func (HCLogAdapter) With ¶
func (h HCLogAdapter) With(args ...interface{}) hclog.Logger