server

package
v0.0.0-...-14f7cec Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package server provides a client and server for communicating account data over a socket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct{}

Client implements AccountProvider as a client that sends requests to the Google Compute User Accounts daemon.

func (*Client) AuthorizedKeys

func (c *Client) AuthorizedKeys(username string) ([]string, error)

AuthorizedKeys satisfies AccountProvider.

func (*Client) GroupByGID

func (c *Client) GroupByGID(gid uint32) (*accounts.Group, error)

GroupByGID satisfies AccountProvider.

func (*Client) GroupByName

func (c *Client) GroupByName(name string) (*accounts.Group, error)

GroupByName satisfies AccountProvider.

func (*Client) Groups

func (c *Client) Groups() ([]*accounts.Group, error)

Groups satisfies AccountProvider.

func (*Client) IsName

func (c *Client) IsName(name string) (bool, error)

IsName satisfies AccountProvider.

func (*Client) Names

func (c *Client) Names() ([]string, error)

Names satisfies AccountProvider.

func (*Client) UserByName

func (c *Client) UserByName(name string) (*accounts.User, error)

UserByName satisfies AccountProvider.

func (*Client) UserByUID

func (c *Client) UserByUID(uid uint32) (*accounts.User, error)

UserByUID satisfies AccountProvider.

func (*Client) Users

func (c *Client) Users() ([]*accounts.User, error)

Users satisfies AccountProvider.

type Server

type Server struct {
	Provider accounts.AccountProvider
}

A Server provides account information to a Client through a socket.

func (*Server) Serve

func (s *Server) Serve() error

Serve begins serving accounts information through a socket forever.

Jump to

Keyboard shortcuts

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