api

package
v2.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

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

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.

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 attempts to create the client.
	CreateClient(ctx context.Context, in *CreateClientReq, opts ...grpc.CallOption) (*CreateClientResp, error)
	// DeleteClient attempts to delete the provided client.
	DeleteClient(ctx context.Context, in *DeleteClientReq, opts ...grpc.CallOption) (*DeleteClientResp, error)
	// CreatePassword attempts to create the password.
	CreatePassword(ctx context.Context, in *CreatePasswordReq, opts ...grpc.CallOption) (*CreatePasswordResp, error)
	// UpdatePassword attempts to modify existing password.
	UpdatePassword(ctx context.Context, in *UpdatePasswordReq, opts ...grpc.CallOption) (*UpdatePasswordResp, error)
	// DeletePassword attempts to delete the password.
	DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*DeletePasswordResp, error)
}

func NewDexClient

func NewDexClient(cc *grpc.ClientConn) DexClient

type DexServer

type DexServer interface {
	// CreateClient attempts to create the client.
	CreateClient(context.Context, *CreateClientReq) (*CreateClientResp, error)
	// DeleteClient attempts to delete the provided client.
	DeleteClient(context.Context, *DeleteClientReq) (*DeleteClientResp, error)
	// CreatePassword attempts to create the password.
	CreatePassword(context.Context, *CreatePasswordReq) (*CreatePasswordResp, error)
	// UpdatePassword attempts to modify existing password.
	UpdatePassword(context.Context, *UpdatePasswordReq) (*UpdatePasswordResp, error)
	// DeletePassword attempts to delete the password.
	DeletePassword(context.Context, *DeletePasswordReq) (*DeletePasswordResp, error)
}

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 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

Jump to

Keyboard shortcuts

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