Documentation ¶
Index ¶
- Variables
- type ClientConfig
- type CreateDeviceInput
- type CreatePreAuthKeyInput
- type Headscale
- type HeadscaleService
- func (h *HeadscaleService) CreateAPIKey(ctx context.Context, expiration *strfmt.DateTime) (string, error)
- func (h *HeadscaleService) CreateDevice(ctx context.Context, user string, key string) (*models.V1Node, error)
- func (h *HeadscaleService) CreatePreAuthKey(ctx context.Context, input CreatePreAuthKeyInput) (*models.V1PreAuthKey, error)
- func (h *HeadscaleService) CreateUser(ctx context.Context, name string) (*models.V1User, error)
- func (h *HeadscaleService) DeleteDevice(ctx context.Context, deviceId string) error
- func (h *HeadscaleService) DeleteRoute(ctx context.Context, route string) error
- func (h *HeadscaleService) DeleteUser(ctx context.Context, name string) error
- func (h *HeadscaleService) DisableRoute(ctx context.Context, route string) error
- func (h *HeadscaleService) EnableRoute(ctx context.Context, route string) error
- func (h *HeadscaleService) ExpireAPIKey(ctx context.Context, key string) error
- func (h *HeadscaleService) ExpireDevice(ctx context.Context, deviceId string) (*models.V1Node, error)
- func (h *HeadscaleService) ExpirePreAuthKey(ctx context.Context, user string, key string) error
- func (h *HeadscaleService) GetDevice(ctx context.Context, deviceId string) (*models.V1Node, error)
- func (h *HeadscaleService) GetDeviceRoutes(ctx context.Context, deviceId string) ([]*models.V1Route, error)
- func (h *HeadscaleService) GetUser(ctx context.Context, name string) (*models.V1User, error)
- func (h *HeadscaleService) ListAPIKeys(ctx context.Context) ([]*models.V1APIKey, error)
- func (h *HeadscaleService) ListDevices(ctx context.Context, user *string) ([]*models.V1Node, error)
- func (h *HeadscaleService) ListPreAuthKeys(ctx context.Context, user string) ([]*models.V1PreAuthKey, error)
- func (h *HeadscaleService) ListRoutes(ctx context.Context) ([]*models.V1Route, error)
- func (h *HeadscaleService) ListUsers(ctx context.Context) ([]*models.V1User, error)
- func (h *HeadscaleService) MoveDevice(ctx context.Context, deviceId string, user string) (*models.V1Node, error)
- func (h *HeadscaleService) RenameDevice(ctx context.Context, deviceId string, name string) (*models.V1Node, error)
- func (h *HeadscaleService) RenameUser(ctx context.Context, oldName string, newName string) (*models.V1User, error)
- func (h *HeadscaleService) TagDevice(ctx context.Context, deviceId string, tags []string) (*models.V1Node, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // An error that is thrown when the response body is empty https://github.com/go-swagger/go-swagger/issues/1929 ServiceEmptyBodyErrMessage = "&{0 [] } (*models.RPCStatus) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface" ErrEmptyResponseBody = errors.New("the request response body was empty, which likely means the request was unauthorized. check your authentication credentials and try again") )
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type CreateDeviceInput ¶
type CreatePreAuthKeyInput ¶
type Headscale ¶
type Headscale interface { ListAPIKeys(ctx context.Context) ([]*models.V1APIKey, error) CreateAPIKey(ctx context.Context, expiration *strfmt.DateTime) (string, error) ExpireAPIKey(ctx context.Context, key string) error ListDevices(ctx context.Context, user *string) ([]*models.V1Node, error) GetDevice(ctx context.Context, deviceId string) (*models.V1Node, error) CreateDevice(ctx context.Context, user string, key string) (*models.V1Node, error) ExpireDevice(ctx context.Context, deviceId string) (*models.V1Node, error) DeleteDevice(ctx context.Context, deviceId string) error RenameDevice(ctx context.Context, deviceId string, newName string) (*models.V1Node, error) GetDeviceRoutes(ctx context.Context, deviceId string) ([]*models.V1Route, error) TagDevice(ctx context.Context, deviceId string, tags []string) (*models.V1Node, error) MoveDevice(ctx context.Context, deviceId string, newOwner string) (*models.V1Node, error) ListPreAuthKeys(ctx context.Context, user string) ([]*models.V1PreAuthKey, error) CreatePreAuthKey(ctx context.Context, input CreatePreAuthKeyInput) (*models.V1PreAuthKey, error) ExpirePreAuthKey(ctx context.Context, user string, key string) error ListRoutes(ctx context.Context) ([]*models.V1Route, error) DeleteRoute(ctx context.Context, routeId string) error DisableRoute(ctx context.Context, routeId string) error EnableRoute(ctx context.Context, routeId string) error GetUser(ctx context.Context, userId string) (*models.V1User, error) ListUsers(ctx context.Context) ([]*models.V1User, error) CreateUser(ctx context.Context, name string) (*models.V1User, error) DeleteUser(ctx context.Context, userId string) error RenameUser(ctx context.Context, oldName string, newName string) (*models.V1User, error) }
func New ¶
func New(c ClientConfig) (Headscale, error)
type HeadscaleService ¶
type HeadscaleService struct {
// contains filtered or unexported fields
}
func (*HeadscaleService) CreateAPIKey ¶
func (*HeadscaleService) CreateDevice ¶
func (*HeadscaleService) CreatePreAuthKey ¶
func (h *HeadscaleService) CreatePreAuthKey(ctx context.Context, input CreatePreAuthKeyInput) (*models.V1PreAuthKey, error)
func (*HeadscaleService) CreateUser ¶
func (*HeadscaleService) DeleteDevice ¶
func (h *HeadscaleService) DeleteDevice(ctx context.Context, deviceId string) error
func (*HeadscaleService) DeleteRoute ¶
func (h *HeadscaleService) DeleteRoute(ctx context.Context, route string) error
func (*HeadscaleService) DeleteUser ¶
func (h *HeadscaleService) DeleteUser(ctx context.Context, name string) error
func (*HeadscaleService) DisableRoute ¶
func (h *HeadscaleService) DisableRoute(ctx context.Context, route string) error
func (*HeadscaleService) EnableRoute ¶
func (h *HeadscaleService) EnableRoute(ctx context.Context, route string) error
func (*HeadscaleService) ExpireAPIKey ¶
func (h *HeadscaleService) ExpireAPIKey(ctx context.Context, key string) error
func (*HeadscaleService) ExpireDevice ¶
func (*HeadscaleService) ExpirePreAuthKey ¶
func (*HeadscaleService) GetDeviceRoutes ¶
func (*HeadscaleService) ListAPIKeys ¶
func (*HeadscaleService) ListDevices ¶
func (*HeadscaleService) ListPreAuthKeys ¶
func (h *HeadscaleService) ListPreAuthKeys(ctx context.Context, user string) ([]*models.V1PreAuthKey, error)
func (*HeadscaleService) ListRoutes ¶
func (*HeadscaleService) MoveDevice ¶
func (*HeadscaleService) RenameDevice ¶
func (*HeadscaleService) RenameUser ¶
Click to show internal directories.
Click to hide internal directories.