api

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 5 Imported by: 123

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

api/api.proto

It has these top-level messages:

Client
CreateClientReq
CreateClientResp
DeleteClientReq
DeleteClientResp
Password
CreatePasswordReq
CreatePasswordResp
UpdatePasswordReq
UpdatePasswordResp
DeletePasswordReq
DeletePasswordResp
ListPasswordReq
ListPasswordResp
VersionReq
VersionResp
RefreshTokenRef
ListRefreshReq
ListRefreshResp
RevokeRefreshReq
RevokeRefreshResp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDexServer

func RegisterDexServer(s *grpc.Server, srv DexServer)

Types

type Client

type Client struct {
	Id           string   `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Secret       string   `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty"`
	RedirectUris []string `protobuf:"bytes,3,rep,name=redirect_uris,json=redirectUris" json:"redirect_uris,omitempty"`
	TrustedPeers []string `protobuf:"bytes,4,rep,name=trusted_peers,json=trustedPeers" json:"trusted_peers,omitempty"`
	Public       bool     `protobuf:"varint,5,opt,name=public" json:"public,omitempty"`
	Name         string   `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
	LogoUrl      string   `protobuf:"bytes,7,opt,name=logo_url,json=logoUrl" json:"logo_url,omitempty"`
}

Client represents an OAuth2 client.

func (*Client) Descriptor

func (*Client) Descriptor() ([]byte, []int)

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) Reset

func (m *Client) Reset()

func (*Client) String

func (m *Client) String() string

type CreateClientReq

type CreateClientReq struct {
	Client *Client `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"`
}

CreateClientReq is a request to make a client.

func (*CreateClientReq) Descriptor

func (*CreateClientReq) Descriptor() ([]byte, []int)

func (*CreateClientReq) GetClient

func (m *CreateClientReq) GetClient() *Client

func (*CreateClientReq) ProtoMessage

func (*CreateClientReq) ProtoMessage()

func (*CreateClientReq) Reset

func (m *CreateClientReq) Reset()

func (*CreateClientReq) String

func (m *CreateClientReq) String() string

type CreateClientResp

type CreateClientResp struct {
	AlreadyExists bool    `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists" json:"already_exists,omitempty"`
	Client        *Client `protobuf:"bytes,2,opt,name=client" json:"client,omitempty"`
}

CreateClientResp returns the response from creating a client.

func (*CreateClientResp) Descriptor

func (*CreateClientResp) Descriptor() ([]byte, []int)

func (*CreateClientResp) GetClient

func (m *CreateClientResp) GetClient() *Client

func (*CreateClientResp) ProtoMessage

func (*CreateClientResp) ProtoMessage()

func (*CreateClientResp) Reset

func (m *CreateClientResp) Reset()

func (*CreateClientResp) String

func (m *CreateClientResp) String() string

type CreatePasswordReq

type CreatePasswordReq struct {
	Password *Password `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
}

CreatePasswordReq is a request to make a password.

func (*CreatePasswordReq) Descriptor

func (*CreatePasswordReq) Descriptor() ([]byte, []int)

func (*CreatePasswordReq) GetPassword

func (m *CreatePasswordReq) GetPassword() *Password

func (*CreatePasswordReq) ProtoMessage

func (*CreatePasswordReq) ProtoMessage()

func (*CreatePasswordReq) Reset

func (m *CreatePasswordReq) Reset()

func (*CreatePasswordReq) String

func (m *CreatePasswordReq) String() string

type CreatePasswordResp

type CreatePasswordResp struct {
	AlreadyExists bool `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists" json:"already_exists,omitempty"`
}

CreatePasswordResp returns the response from creating a password.

func (*CreatePasswordResp) Descriptor

func (*CreatePasswordResp) Descriptor() ([]byte, []int)

func (*CreatePasswordResp) ProtoMessage

func (*CreatePasswordResp) ProtoMessage()

func (*CreatePasswordResp) Reset

func (m *CreatePasswordResp) Reset()

func (*CreatePasswordResp) String

func (m *CreatePasswordResp) String() string

type DeleteClientReq

type DeleteClientReq struct {
	// The ID of the client.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

DeleteClientReq is a request to delete a client.

func (*DeleteClientReq) Descriptor

func (*DeleteClientReq) Descriptor() ([]byte, []int)

func (*DeleteClientReq) ProtoMessage

func (*DeleteClientReq) ProtoMessage()

func (*DeleteClientReq) Reset

func (m *DeleteClientReq) Reset()

func (*DeleteClientReq) String

func (m *DeleteClientReq) String() string

type DeleteClientResp

type DeleteClientResp struct {
	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
}

DeleteClientResp determines if the client is deleted successfully.

func (*DeleteClientResp) Descriptor

func (*DeleteClientResp) Descriptor() ([]byte, []int)

func (*DeleteClientResp) ProtoMessage

func (*DeleteClientResp) ProtoMessage()

func (*DeleteClientResp) Reset

func (m *DeleteClientResp) Reset()

func (*DeleteClientResp) String

func (m *DeleteClientResp) String() string

type DeletePasswordReq

type DeletePasswordReq struct {
	Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
}

DeletePasswordReq is a request to delete a password.

func (*DeletePasswordReq) Descriptor

func (*DeletePasswordReq) Descriptor() ([]byte, []int)

func (*DeletePasswordReq) ProtoMessage

func (*DeletePasswordReq) ProtoMessage()

func (*DeletePasswordReq) Reset

func (m *DeletePasswordReq) Reset()

func (*DeletePasswordReq) String

func (m *DeletePasswordReq) String() string

type DeletePasswordResp

type DeletePasswordResp struct {
	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
}

DeletePasswordResp returns the response from deleting a password.

func (*DeletePasswordResp) Descriptor

func (*DeletePasswordResp) Descriptor() ([]byte, []int)

func (*DeletePasswordResp) ProtoMessage

func (*DeletePasswordResp) ProtoMessage()

func (*DeletePasswordResp) Reset

func (m *DeletePasswordResp) Reset()

func (*DeletePasswordResp) String

func (m *DeletePasswordResp) String() string

type DexClient

type DexClient interface {
	// CreateClient creates a client.
	CreateClient(ctx context.Context, in *CreateClientReq, opts ...grpc.CallOption) (*CreateClientResp, error)
	// DeleteClient deletes the provided client.
	DeleteClient(ctx context.Context, in *DeleteClientReq, opts ...grpc.CallOption) (*DeleteClientResp, error)
	// CreatePassword creates a password.
	CreatePassword(ctx context.Context, in *CreatePasswordReq, opts ...grpc.CallOption) (*CreatePasswordResp, error)
	// UpdatePassword modifies existing password.
	UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordResp, error)
	// DeletePassword deletes the password.
	DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*DeletePasswordResp, error)
	// ListPassword lists all password entries.
	ListPasswords(ctx context.Context, in *ListPasswordReq, opts ...grpc.CallOption) (*ListPasswordResp, error)
	// GetVersion returns version information of the server.
	GetVersion(ctx context.Context, in *VersionReq, opts ...grpc.CallOption) (*VersionResp, error)
	// ListRefresh lists all the refresh token entries for a particular user.
	ListRefresh(ctx context.Context, in *ListRefreshReq, opts ...grpc.CallOption) (*ListRefreshResp, error)
	// RevokeRefresh revokes the refresh token for the provided user-client pair.
	//
	// Note that each user-client pair can have only one refresh token at a time.
	RevokeRefresh(ctx context.Context, in *RevokeRefreshReq, opts ...grpc.CallOption) (*RevokeRefreshResp, error)
}

func NewDexClient

func NewDexClient(cc *grpc.ClientConn) DexClient

type DexServer

type DexServer interface {
	// CreateClient creates a client.
	CreateClient(context.Context, *CreateClientReq) (*CreateClientResp, error)
	// DeleteClient deletes the provided client.
	DeleteClient(context.Context, *DeleteClientReq) (*DeleteClientResp, error)
	// CreatePassword creates a password.
	CreatePassword(context.Context, *CreatePasswordReq) (*CreatePasswordResp, error)
	// UpdatePassword modifies existing password.
	UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordResp, error)
	// DeletePassword deletes the password.
	DeletePassword(context.Context, *DeletePasswordReq) (*DeletePasswordResp, error)
	// ListPassword lists all password entries.
	ListPasswords(context.Context, *ListPasswordReq) (*ListPasswordResp, error)
	// GetVersion returns version information of the server.
	GetVersion(context.Context, *VersionReq) (*VersionResp, error)
	// ListRefresh lists all the refresh token entries for a particular user.
	ListRefresh(context.Context, *ListRefreshReq) (*ListRefreshResp, error)
	// RevokeRefresh revokes the refresh token for the provided user-client pair.
	//
	// Note that each user-client pair can have only one refresh token at a time.
	RevokeRefresh(context.Context, *RevokeRefreshReq) (*RevokeRefreshResp, error)
}

type ListPasswordReq

type ListPasswordReq struct {
}

ListPasswordReq is a request to enumerate passwords.

func (*ListPasswordReq) Descriptor

func (*ListPasswordReq) Descriptor() ([]byte, []int)

func (*ListPasswordReq) ProtoMessage

func (*ListPasswordReq) ProtoMessage()

func (*ListPasswordReq) Reset

func (m *ListPasswordReq) Reset()

func (*ListPasswordReq) String

func (m *ListPasswordReq) String() string

type ListPasswordResp

type ListPasswordResp struct {
	Passwords []*Password `protobuf:"bytes,1,rep,name=passwords" json:"passwords,omitempty"`
}

ListPasswordResp returns a list of passwords.

func (*ListPasswordResp) Descriptor

func (*ListPasswordResp) Descriptor() ([]byte, []int)

func (*ListPasswordResp) GetPasswords

func (m *ListPasswordResp) GetPasswords() []*Password

func (*ListPasswordResp) ProtoMessage

func (*ListPasswordResp) ProtoMessage()

func (*ListPasswordResp) Reset

func (m *ListPasswordResp) Reset()

func (*ListPasswordResp) String

func (m *ListPasswordResp) String() string

type ListRefreshReq

type ListRefreshReq struct {
	// The "sub" claim returned in the ID Token.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
}

ListRefreshReq is a request to enumerate the refresh tokens of a user.

func (*ListRefreshReq) Descriptor

func (*ListRefreshReq) Descriptor() ([]byte, []int)

func (*ListRefreshReq) ProtoMessage

func (*ListRefreshReq) ProtoMessage()

func (*ListRefreshReq) Reset

func (m *ListRefreshReq) Reset()

func (*ListRefreshReq) String

func (m *ListRefreshReq) String() string

type ListRefreshResp

type ListRefreshResp struct {
	RefreshTokens []*RefreshTokenRef `protobuf:"bytes,1,rep,name=refresh_tokens,json=refreshTokens" json:"refresh_tokens,omitempty"`
}

ListRefreshResp returns a list of refresh tokens for a user.

func (*ListRefreshResp) Descriptor

func (*ListRefreshResp) Descriptor() ([]byte, []int)

func (*ListRefreshResp) GetRefreshTokens

func (m *ListRefreshResp) GetRefreshTokens() []*RefreshTokenRef

func (*ListRefreshResp) ProtoMessage

func (*ListRefreshResp) ProtoMessage()

func (*ListRefreshResp) Reset

func (m *ListRefreshResp) Reset()

func (*ListRefreshResp) String

func (m *ListRefreshResp) String() string

type Password

type Password struct {
	Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
	// Currently we do not accept plain text passwords. Could be an option in the future.
	Hash     []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	Username string `protobuf:"bytes,3,opt,name=username" json:"username,omitempty"`
	UserId   string `protobuf:"bytes,4,opt,name=user_id,json=userId" json:"user_id,omitempty"`
}

Password is an email for password mapping managed by the storage.

func (*Password) Descriptor

func (*Password) Descriptor() ([]byte, []int)

func (*Password) ProtoMessage

func (*Password) ProtoMessage()

func (*Password) Reset

func (m *Password) Reset()

func (*Password) String

func (m *Password) String() string

type RefreshTokenRef

type RefreshTokenRef struct {
	// ID of the refresh token.
	Id        string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	ClientId  string `protobuf:"bytes,2,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
	CreatedAt int64  `protobuf:"varint,5,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
	LastUsed  int64  `protobuf:"varint,6,opt,name=last_used,json=lastUsed" json:"last_used,omitempty"`
}

RefreshTokenRef contains the metadata for a refresh token that is managed by the storage.

func (*RefreshTokenRef) Descriptor

func (*RefreshTokenRef) Descriptor() ([]byte, []int)

func (*RefreshTokenRef) ProtoMessage

func (*RefreshTokenRef) ProtoMessage()

func (*RefreshTokenRef) Reset

func (m *RefreshTokenRef) Reset()

func (*RefreshTokenRef) String

func (m *RefreshTokenRef) String() string

type RevokeRefreshReq

type RevokeRefreshReq struct {
	// The "sub" claim returned in the ID Token.
	UserId   string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
}

RevokeRefreshReq is a request to revoke the refresh token of the user-client pair.

func (*RevokeRefreshReq) Descriptor

func (*RevokeRefreshReq) Descriptor() ([]byte, []int)

func (*RevokeRefreshReq) ProtoMessage

func (*RevokeRefreshReq) ProtoMessage()

func (*RevokeRefreshReq) Reset

func (m *RevokeRefreshReq) Reset()

func (*RevokeRefreshReq) String

func (m *RevokeRefreshReq) String() string

type RevokeRefreshResp

type RevokeRefreshResp struct {
	// Set to true is refresh token was not found and token could not be revoked.
	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
}

RevokeRefreshResp determines if the refresh token is revoked successfully.

func (*RevokeRefreshResp) Descriptor

func (*RevokeRefreshResp) Descriptor() ([]byte, []int)

func (*RevokeRefreshResp) ProtoMessage

func (*RevokeRefreshResp) ProtoMessage()

func (*RevokeRefreshResp) Reset

func (m *RevokeRefreshResp) Reset()

func (*RevokeRefreshResp) String

func (m *RevokeRefreshResp) String() string

type UpdatePasswordReq

type UpdatePasswordReq struct {
	// The email used to lookup the password. This field cannot be modified
	Email       string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
	NewHash     []byte `protobuf:"bytes,2,opt,name=new_hash,json=newHash,proto3" json:"new_hash,omitempty"`
	NewUsername string `protobuf:"bytes,3,opt,name=new_username,json=newUsername" json:"new_username,omitempty"`
}

UpdatePasswordReq is a request to modify an existing password.

func (*UpdatePasswordReq) Descriptor

func (*UpdatePasswordReq) Descriptor() ([]byte, []int)

func (*UpdatePasswordReq) ProtoMessage

func (*UpdatePasswordReq) ProtoMessage()

func (*UpdatePasswordReq) Reset

func (m *UpdatePasswordReq) Reset()

func (*UpdatePasswordReq) String

func (m *UpdatePasswordReq) String() string

type UpdatePasswordResp

type UpdatePasswordResp struct {
	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound" json:"not_found,omitempty"`
}

UpdatePasswordResp returns the response from modifying an existing password.

func (*UpdatePasswordResp) Descriptor

func (*UpdatePasswordResp) Descriptor() ([]byte, []int)

func (*UpdatePasswordResp) ProtoMessage

func (*UpdatePasswordResp) ProtoMessage()

func (*UpdatePasswordResp) Reset

func (m *UpdatePasswordResp) Reset()

func (*UpdatePasswordResp) String

func (m *UpdatePasswordResp) String() string

type VersionReq

type VersionReq struct {
}

VersionReq is a request to fetch version info.

func (*VersionReq) Descriptor

func (*VersionReq) Descriptor() ([]byte, []int)

func (*VersionReq) ProtoMessage

func (*VersionReq) ProtoMessage()

func (*VersionReq) Reset

func (m *VersionReq) Reset()

func (*VersionReq) String

func (m *VersionReq) String() string

type VersionResp

type VersionResp struct {
	// Semantic version of the server.
	Server string `protobuf:"bytes,1,opt,name=server" json:"server,omitempty"`
	// Numeric version of the API. It increases everytime a new call is added to the API.
	// Clients should use this info to determine if the server supports specific features.
	Api int32 `protobuf:"varint,2,opt,name=api" json:"api,omitempty"`
}

VersionResp holds the version info of components.

func (*VersionResp) Descriptor

func (*VersionResp) Descriptor() ([]byte, []int)

func (*VersionResp) ProtoMessage

func (*VersionResp) ProtoMessage()

func (*VersionResp) Reset

func (m *VersionResp) Reset()

func (*VersionResp) String

func (m *VersionResp) String() string

Jump to

Keyboard shortcuts

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