ghapp

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TokenValidity = time.Hour

TokenValidity is the duration for which a token is valid. Always exactly 1 hour.

Variables

View Source
var (
	ConfigPath = "/config"
	ConfigName = "gtm"
)

Functions

func FromContext

func FromContext(ctx context.Context) (ghait.GHAIT, error)

func NewContext

func NewContext(ctx context.Context, ghapp ghait.GHAIT) context.Context

func NewGHApp

func NewGHApp(ctx context.Context) (ghait.GHAIT, error)

Types

type OperatorConfig

type OperatorConfig struct {
	AppID          int64  `mapstructure:"app_id"`
	InstallationID int64  `mapstructure:"installation_id"`
	Provider       string `mapstructure:"provider"`
	Key            string `mapstructure:"key"`
}

func LoadConfig

func LoadConfig(ctx context.Context) (*OperatorConfig, error)

func (*OperatorConfig) GetAppID

func (c *OperatorConfig) GetAppID() int64

func (*OperatorConfig) GetInstallationID

func (c *OperatorConfig) GetInstallationID() int64

func (*OperatorConfig) GetKey

func (c *OperatorConfig) GetKey() string

func (*OperatorConfig) GetProvider

func (c *OperatorConfig) GetProvider() string

Jump to

Keyboard shortcuts

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