s3

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSource added in v1.1.0

func CreateSource(client s3iface.S3API, prefix string, bucket string) source.Source

CreateSource returns a new Source for fetching data from S3 backends.

func DownloadS3Data

func DownloadS3Data(c s3iface.S3API, bucket string, key string) ([]byte, error)

DownloadS3Data returns the contents of a file (key argument) from the given bucket

Types

type Source added in v1.1.0

type Source struct {
	// contains filtered or unexported fields
}

Source describes a source.Source for S3 backends:

  • prefix: the path within the S3 bucket to the passwd, shadow and group files
  • bucket: the name of the S3 bucket
  • client: the S3 client

func (*Source) FillGroupCache added in v1.1.0

func (s *Source) FillGroupCache(c *cache.Cache) error

FillGroupCache downloads shadow file from S3, parses the JSON and writes the group NSS cache file to disk.

func (*Source) FillPasswdCache added in v1.1.0

func (s *Source) FillPasswdCache(c *cache.Cache) error

FillPasswdCache downloads shadow file from S3, parses the JSON and writes the passwd NSS cache file to disk.

func (*Source) FillShadowCache added in v1.1.0

func (s *Source) FillShadowCache(c *cache.Cache) error

FillShadowCache downloads shadow file from S3, parses the JSON and writes the shadow NSS cache file to disk.

Jump to

Keyboard shortcuts

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