workerschema

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

README

Dex API

The Dex REST API

Version: v1

Models

Client
{
    id: string,
    redirectURIs: [
        string
    ]
}
ClientPage
{
    clients: [
        Client
    ],
    nextPageToken: string
}
ClientWithSecret
{
    id: string,
    redirectURIs: [
        string
    ],
    secret: string
}
Error
{
    error: string,
    error_description: string
}
RefreshClient

A client with associated public metadata.

{
    clientID: string,
    clientName: string,
    clientURI: string,
    logoURI: string
}
RefreshClientList
{
    clients: [
        RefreshClient
    ]
}
ResendEmailInvitationRequest
{
    redirectURL: string
}
ResendEmailInvitationResponse
{
    emailSent: boolean,
    resetPasswordLink: string
}
User
{
    admin: boolean,
    createdAt: string,
    disabled: boolean,
    displayName: string,
    email: string,
    emailVerified: boolean,
    id: string
}
UserCreateRequest
{
    redirectURL: string,
    user: User
}
UserCreateResponse
{
    emailSent: boolean,
    resetPasswordLink: string,
    user: User
}
UserDisableRequest
{
    disable: boolean // If true, disable this user, if false, enable them. No error is signaled if the user state doesn't change.
}
UserDisableResponse
{
    ok: boolean
}
UserResponse
{
    user: User
}
UsersResponse
{
    nextPageToken: string,
    users: [
        User
    ]
}

Paths

GET /account/{userid}/refresh

Summary

List RefreshClient

Description

List all clients that hold refresh tokens for the authenticated user.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | userid | path | | Yes | string |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | RefreshClientList | | default | Unexpected error | |

DELETE /account/{userid}/refresh/{clientid}

Summary

Revoke Clients

Description

Revoke all refresh tokens issues to the client for the authenticated user.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | clientid | path | | Yes | string | | userid | path | | Yes | string |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | default | Unexpected error | |

GET /clients

Summary

List Clients

Description

Retrieve a page of Client objects.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | nextPageToken | query | | No | string |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | ClientPage | | default | Unexpected error | |

POST /clients

Summary

Create Clients

Description

Register a new Client.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | | body | | Yes | Client |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | ClientWithSecret | | default | Unexpected error | |

GET /users

Summary

List Users

Description

Retrieve a page of User objects.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | nextPageToken | query | | No | string | | maxResults | query | | No | integer |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | UsersResponse | | default | Unexpected error | |

POST /users

Summary

Create Users

Description

Create a new User.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | | body | | Yes | UserCreateRequest |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | UserCreateResponse | | default | Unexpected error | |

GET /users/{id}

Summary

Get Users

Description

Get a single User object by id.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | id | path | | Yes | string |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | UserResponse | | default | Unexpected error | |

POST /users/{id}/disable

Summary

Disable Users

Description

Enable or disable a user.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | id | path | | Yes | string | | | body | | Yes | UserDisableRequest |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | UserDisableResponse | | default | Unexpected error | |

POST /users/{id}/resend-invitation

Summary

ResendEmailInvitation Users

Description

Resend invitation email to an existing user with unverified email.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | id | path | | Yes | string | | | body | | Yes | ResendEmailInvitationRequest |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | ResendEmailInvitationResponse | | default | Unexpected error | |

Documentation

Overview

Package workerschema provides access to the Dex API.

See http://github.com/coreos/dex

Usage example:

import "google.golang.org/api/workerschema/v1"
...
workerschemaService, err := workerschema.New(oauthHttpClient)

Index

Constants

View Source
const DiscoveryJSON = `` /* 9557-byte string literal not displayed */

This file is automatically generated by schema/generator

**** DO NOT EDIT ****

Variables

This section is empty.

Functions

func MapSchemaClientToClient added in v0.4.0

func MapSchemaClientToClient(sc Client) (client.Client, error)

Types

type Client

type Client struct {
	Id string `json:"id,omitempty"`

	RedirectURIs []string `json:"redirectURIs,omitempty"`
}

func MapClientToSchemaClient added in v0.4.0

func MapClientToSchemaClient(c client.Client) Client

type ClientPage

type ClientPage struct {
	Clients []*Client `json:"clients,omitempty"`

	NextPageToken string `json:"nextPageToken,omitempty"`
}

type ClientWithSecret

type ClientWithSecret struct {
	Id string `json:"id,omitempty"`

	RedirectURIs []string `json:"redirectURIs,omitempty"`

	Secret string `json:"secret,omitempty"`
}

func MapClientToSchemaClientWithSecret added in v0.4.0

func MapClientToSchemaClientWithSecret(c client.Client) ClientWithSecret

type ClientsCreateCall

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

func (*ClientsCreateCall) Do

func (*ClientsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ClientsListCall

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

func (*ClientsListCall) Do

func (c *ClientsListCall) Do() (*ClientPage, error)

func (*ClientsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ClientsListCall) NextPageToken

func (c *ClientsListCall) NextPageToken(nextPageToken string) *ClientsListCall

NextPageToken sets the optional parameter "nextPageToken":

type ClientsRevokeCall added in v0.4.0

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

func (*ClientsRevokeCall) Do added in v0.4.0

func (c *ClientsRevokeCall) Do() error

func (*ClientsRevokeCall) Fields added in v0.4.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ClientsService

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

func NewClientsService

func NewClientsService(s *Service) *ClientsService

func (*ClientsService) Create

func (r *ClientsService) Create(client *Client) *ClientsCreateCall

Create: Register a new Client.

func (*ClientsService) List

func (r *ClientsService) List() *ClientsListCall

List: Retrieve a page of Client objects.

func (*ClientsService) Revoke added in v0.4.0

func (r *ClientsService) Revoke(userid string, clientid string) *ClientsRevokeCall

Revoke: Revoke all refresh tokens issues to the client for the authenticated user.

type Error

type Error struct {
	Error string `json:"error,omitempty"`

	Error_description string `json:"error_description,omitempty"`
}

type RefreshClient added in v0.4.0

type RefreshClient struct {
	ClientID string `json:"clientID,omitempty"`

	ClientName string `json:"clientName,omitempty"`

	ClientURI string `json:"clientURI,omitempty"`

	LogoURI string `json:"logoURI,omitempty"`
}

type RefreshClientList added in v0.4.0

type RefreshClientList struct {
	Clients []*RefreshClient `json:"clients,omitempty"`
}

type RefreshClientListCall added in v0.4.0

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

func (*RefreshClientListCall) Do added in v0.4.0

func (*RefreshClientListCall) Fields added in v0.4.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type RefreshClientService added in v0.4.0

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

func NewRefreshClientService added in v0.4.0

func NewRefreshClientService(s *Service) *RefreshClientService

func (*RefreshClientService) List added in v0.4.0

List: List all clients that hold refresh tokens for the authenticated user.

type ResendEmailInvitationRequest added in v0.3.0

type ResendEmailInvitationRequest struct {
	RedirectURL string `json:"redirectURL,omitempty"`
}

type ResendEmailInvitationResponse added in v0.3.0

type ResendEmailInvitationResponse struct {
	EmailSent bool `json:"emailSent,omitempty"`

	ResetPasswordLink string `json:"resetPasswordLink,omitempty"`
}

type Service

type Service struct {
	BasePath string // API endpoint base URL

	Clients *ClientsService

	RefreshClient *RefreshClientService

	Users *UsersService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

func NewWithBasePath

func NewWithBasePath(client *http.Client, basePath string) (*Service, error)

type User

type User struct {
	Admin bool `json:"admin,omitempty"`

	CreatedAt string `json:"createdAt,omitempty"`

	Disabled bool `json:"disabled,omitempty"`

	DisplayName string `json:"displayName,omitempty"`

	Email string `json:"email,omitempty"`

	EmailVerified bool `json:"emailVerified,omitempty"`

	Id string `json:"id,omitempty"`
}

type UserCreateRequest

type UserCreateRequest struct {
	RedirectURL string `json:"redirectURL,omitempty"`

	User *User `json:"user,omitempty"`
}

type UserCreateResponse

type UserCreateResponse struct {
	EmailSent bool `json:"emailSent,omitempty"`

	ResetPasswordLink string `json:"resetPasswordLink,omitempty"`

	User *User `json:"user,omitempty"`
}

type UserCreateResponseUser

type UserCreateResponseUser struct {
}

type UserDisableRequest added in v0.2.0

type UserDisableRequest struct {
	// Disable: If true, disable this user, if false, enable them. No error
	// is signaled if the user state doesn't change.
	Disable bool `json:"disable,omitempty"`
}

type UserDisableResponse added in v0.2.0

type UserDisableResponse struct {
	Ok bool `json:"ok,omitempty"`
}

type UserResponse

type UserResponse struct {
	User *User `json:"user,omitempty"`
}

type UsersCreateCall

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

func (*UsersCreateCall) Do

func (*UsersCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersDisableCall added in v0.2.0

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

func (*UsersDisableCall) Do added in v0.2.0

func (*UsersDisableCall) Fields added in v0.2.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersGetCall

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

func (*UsersGetCall) Do

func (c *UsersGetCall) Do() (*UserResponse, error)

func (*UsersGetCall) Fields

func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersListCall

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

func (*UsersListCall) Do

func (c *UsersListCall) Do() (*UsersResponse, error)

func (*UsersListCall) Fields

func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*UsersListCall) MaxResults

func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall

MaxResults sets the optional parameter "maxResults":

func (*UsersListCall) NextPageToken

func (c *UsersListCall) NextPageToken(nextPageToken string) *UsersListCall

NextPageToken sets the optional parameter "nextPageToken":

type UsersResendEmailInvitationCall added in v0.3.0

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

func (*UsersResendEmailInvitationCall) Do added in v0.3.0

func (*UsersResendEmailInvitationCall) Fields added in v0.3.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type UsersResponse

type UsersResponse struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	Users []*User `json:"users,omitempty"`
}

type UsersService

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

func NewUsersService

func NewUsersService(s *Service) *UsersService

func (*UsersService) Create

func (r *UsersService) Create(usercreaterequest *UserCreateRequest) *UsersCreateCall

Create: Create a new User.

func (*UsersService) Disable added in v0.2.0

func (r *UsersService) Disable(id string, userdisablerequest *UserDisableRequest) *UsersDisableCall

Disable: Enable or disable a user.

func (*UsersService) Get

func (r *UsersService) Get(id string) *UsersGetCall

Get: Get a single User object by id.

func (*UsersService) List

func (r *UsersService) List() *UsersListCall

List: Retrieve a page of User objects.

func (*UsersService) ResendEmailInvitation added in v0.3.0

func (r *UsersService) ResendEmailInvitation(id string, resendemailinvitationrequest *ResendEmailInvitationRequest) *UsersResendEmailInvitationCall

ResendEmailInvitation: Resend invitation email to an existing user with unverified email.

Jump to

Keyboard shortcuts

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