botsession

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package botsession implements marshaling of Bot Session protos.

Index

Constants

View Source
const Expiry = time.Hour

Expiry is how long a new Swarming session token will last.

Variables

This section is empty.

Functions

func DebugInfo

func DebugInfo(ctx context.Context, backendVer string) *internalspb.DebugInfo

DebugInfo generates new DebugInfo proto identifying the current request.

func FormatForDebug

func FormatForDebug(s *internalspb.Session) string

FormatForDebug formats the session proto for the debug log.

func Marshal

func Marshal(s *internalspb.Session, secret *hmactoken.Secret) ([]byte, error)

Marshal serializes and signs a bot session proto.

func Unmarshal

func Unmarshal(tok []byte, secret *hmactoken.Secret) (*internalspb.Session, error)

Unmarshal checks the signature and deserializes a bot session.

Doesn't check expiration time or validity of any Session fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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