keyvalue

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package keyvalue is generated code used to make or handle TChannel calls using Thrift.

Index

Constants

This section is empty.

Variables

View Source
var BaseServiceHealthCheckResult_Success_DEFAULT string
View Source
var GoUnusedProtection__ int
View Source
var KeyValueGetResult_Success_DEFAULT string

Functions

func NewTChanAdminInheritedClient

func NewTChanAdminInheritedClient(thriftService string, client thrift.TChanClient) *tchanAdminClient

func NewTChanAdminServer

func NewTChanAdminServer(handler TChanAdmin) thrift.TChanServer

NewTChanAdminServer wraps a handler for TChanAdmin so it can be registered with a thrift.Server.

func NewTChanBaseServiceInheritedClient

func NewTChanBaseServiceInheritedClient(thriftService string, client thrift.TChanClient) *tchanBaseServiceClient

func NewTChanBaseServiceServer

func NewTChanBaseServiceServer(handler TChanBaseService) thrift.TChanServer

NewTChanBaseServiceServer wraps a handler for TChanBaseService so it can be registered with a thrift.Server.

func NewTChanKeyValueInheritedClient

func NewTChanKeyValueInheritedClient(thriftService string, client thrift.TChanClient) *tchanKeyValueClient

func NewTChanKeyValueServer

func NewTChanKeyValueServer(handler TChanKeyValue) thrift.TChanServer

NewTChanKeyValueServer wraps a handler for TChanKeyValue so it can be registered with a thrift.Server.

Types

type Admin

type Admin interface {
	BaseService

	ClearAll() (err error)
}

type AdminClearAllArgs

type AdminClearAllArgs struct {
}

func NewAdminClearAllArgs

func NewAdminClearAllArgs() *AdminClearAllArgs

func (*AdminClearAllArgs) Read

func (p *AdminClearAllArgs) Read(iprot thrift.TProtocol) error

func (*AdminClearAllArgs) String

func (p *AdminClearAllArgs) String() string

func (*AdminClearAllArgs) Write

func (p *AdminClearAllArgs) Write(oprot thrift.TProtocol) error

type AdminClearAllResult

type AdminClearAllResult struct {
	NotAuthorized *NotAuthorized `thrift:"notAuthorized,1" json:"notAuthorized,omitempty"`
}

Attributes:

  • NotAuthorized

func NewAdminClearAllResult

func NewAdminClearAllResult() *AdminClearAllResult

func (*AdminClearAllResult) GetNotAuthorized

func (p *AdminClearAllResult) GetNotAuthorized() *NotAuthorized

func (*AdminClearAllResult) IsSetNotAuthorized

func (p *AdminClearAllResult) IsSetNotAuthorized() bool

func (*AdminClearAllResult) Read

func (p *AdminClearAllResult) Read(iprot thrift.TProtocol) error

func (*AdminClearAllResult) String

func (p *AdminClearAllResult) String() string

func (*AdminClearAllResult) Write

func (p *AdminClearAllResult) Write(oprot thrift.TProtocol) error

type AdminClient

type AdminClient struct {
	*BaseServiceClient
}

func NewAdminClientProtocol

func NewAdminClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *AdminClient

func (*AdminClient) ClearAll

func (p *AdminClient) ClearAll() (err error)

type AdminProcessor

type AdminProcessor struct {
	*BaseServiceProcessor
}

func NewAdminProcessor

func NewAdminProcessor(handler Admin) *AdminProcessor

type BaseService

type BaseService interface {
	HealthCheck() (r string, err error)
}

type BaseServiceClient

type BaseServiceClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewBaseServiceClientProtocol

func NewBaseServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BaseServiceClient

func (*BaseServiceClient) HealthCheck

func (p *BaseServiceClient) HealthCheck() (r string, err error)

type BaseServiceHealthCheckArgs

type BaseServiceHealthCheckArgs struct {
}

func NewBaseServiceHealthCheckArgs

func NewBaseServiceHealthCheckArgs() *BaseServiceHealthCheckArgs

func (*BaseServiceHealthCheckArgs) Read

func (*BaseServiceHealthCheckArgs) String

func (p *BaseServiceHealthCheckArgs) String() string

func (*BaseServiceHealthCheckArgs) Write

type BaseServiceHealthCheckResult

type BaseServiceHealthCheckResult struct {
	Success *string `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewBaseServiceHealthCheckResult

func NewBaseServiceHealthCheckResult() *BaseServiceHealthCheckResult

func (*BaseServiceHealthCheckResult) GetSuccess

func (p *BaseServiceHealthCheckResult) GetSuccess() string

func (*BaseServiceHealthCheckResult) IsSetSuccess

func (p *BaseServiceHealthCheckResult) IsSetSuccess() bool

func (*BaseServiceHealthCheckResult) Read

func (*BaseServiceHealthCheckResult) String

func (*BaseServiceHealthCheckResult) Write

type BaseServiceProcessor

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

func NewBaseServiceProcessor

func NewBaseServiceProcessor(handler BaseService) *BaseServiceProcessor

func (*BaseServiceProcessor) AddToProcessorMap

func (p *BaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*BaseServiceProcessor) GetProcessorFunction

func (p *BaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*BaseServiceProcessor) Process

func (p *BaseServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*BaseServiceProcessor) ProcessorMap

func (p *BaseServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type InvalidKey

type InvalidKey struct {
}
var KeyValueGetResult_InvalidKey_DEFAULT *InvalidKey
var KeyValueSetResult_InvalidKey_DEFAULT *InvalidKey

func NewInvalidKey

func NewInvalidKey() *InvalidKey

func (*InvalidKey) Error

func (p *InvalidKey) Error() string

func (*InvalidKey) Read

func (p *InvalidKey) Read(iprot thrift.TProtocol) error

func (*InvalidKey) String

func (p *InvalidKey) String() string

func (*InvalidKey) Write

func (p *InvalidKey) Write(oprot thrift.TProtocol) error

type KeyNotFound

type KeyNotFound struct {
	Key string `thrift:"key,1" json:"key"`
}

Attributes:

  • Key
var KeyValueGetResult_NotFound_DEFAULT *KeyNotFound

func NewKeyNotFound

func NewKeyNotFound() *KeyNotFound

func (*KeyNotFound) Error

func (p *KeyNotFound) Error() string

func (*KeyNotFound) GetKey

func (p *KeyNotFound) GetKey() string

func (*KeyNotFound) Read

func (p *KeyNotFound) Read(iprot thrift.TProtocol) error

func (*KeyNotFound) String

func (p *KeyNotFound) String() string

func (*KeyNotFound) Write

func (p *KeyNotFound) Write(oprot thrift.TProtocol) error

type KeyValue

type KeyValue interface {
	BaseService

	// Parameters:
	//  - Key
	Get(key string) (r string, err error)
	// Parameters:
	//  - Key
	//  - Value
	Set(key string, value string) (err error)
}

type KeyValueClient

type KeyValueClient struct {
	*BaseServiceClient
}

func NewKeyValueClientProtocol

func NewKeyValueClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *KeyValueClient

func (*KeyValueClient) Get

func (p *KeyValueClient) Get(key string) (r string, err error)

Parameters:

  • Key

func (*KeyValueClient) Set

func (p *KeyValueClient) Set(key string, value string) (err error)

Parameters:

  • Key
  • Value

type KeyValueGetArgs

type KeyValueGetArgs struct {
	Key string `thrift:"key,1" json:"key"`
}

Attributes:

  • Key

func NewKeyValueGetArgs

func NewKeyValueGetArgs() *KeyValueGetArgs

func (*KeyValueGetArgs) GetKey

func (p *KeyValueGetArgs) GetKey() string

func (*KeyValueGetArgs) Read

func (p *KeyValueGetArgs) Read(iprot thrift.TProtocol) error

func (*KeyValueGetArgs) String

func (p *KeyValueGetArgs) String() string

func (*KeyValueGetArgs) Write

func (p *KeyValueGetArgs) Write(oprot thrift.TProtocol) error

type KeyValueGetResult

type KeyValueGetResult struct {
	Success    *string      `thrift:"success,0" json:"success,omitempty"`
	NotFound   *KeyNotFound `thrift:"notFound,1" json:"notFound,omitempty"`
	InvalidKey *InvalidKey  `thrift:"invalidKey,2" json:"invalidKey,omitempty"`
}

Attributes:

  • Success
  • NotFound
  • InvalidKey

func NewKeyValueGetResult

func NewKeyValueGetResult() *KeyValueGetResult

func (*KeyValueGetResult) GetInvalidKey

func (p *KeyValueGetResult) GetInvalidKey() *InvalidKey

func (*KeyValueGetResult) GetNotFound

func (p *KeyValueGetResult) GetNotFound() *KeyNotFound

func (*KeyValueGetResult) GetSuccess

func (p *KeyValueGetResult) GetSuccess() string

func (*KeyValueGetResult) IsSetInvalidKey

func (p *KeyValueGetResult) IsSetInvalidKey() bool

func (*KeyValueGetResult) IsSetNotFound

func (p *KeyValueGetResult) IsSetNotFound() bool

func (*KeyValueGetResult) IsSetSuccess

func (p *KeyValueGetResult) IsSetSuccess() bool

func (*KeyValueGetResult) Read

func (p *KeyValueGetResult) Read(iprot thrift.TProtocol) error

func (*KeyValueGetResult) String

func (p *KeyValueGetResult) String() string

func (*KeyValueGetResult) Write

func (p *KeyValueGetResult) Write(oprot thrift.TProtocol) error

type KeyValueProcessor

type KeyValueProcessor struct {
	*BaseServiceProcessor
}

func NewKeyValueProcessor

func NewKeyValueProcessor(handler KeyValue) *KeyValueProcessor

type KeyValueSetArgs

type KeyValueSetArgs struct {
	Key   string `thrift:"key,1" json:"key"`
	Value string `thrift:"value,2" json:"value"`
}

Attributes:

  • Key
  • Value

func NewKeyValueSetArgs

func NewKeyValueSetArgs() *KeyValueSetArgs

func (*KeyValueSetArgs) GetKey

func (p *KeyValueSetArgs) GetKey() string

func (*KeyValueSetArgs) GetValue

func (p *KeyValueSetArgs) GetValue() string

func (*KeyValueSetArgs) Read

func (p *KeyValueSetArgs) Read(iprot thrift.TProtocol) error

func (*KeyValueSetArgs) String

func (p *KeyValueSetArgs) String() string

func (*KeyValueSetArgs) Write

func (p *KeyValueSetArgs) Write(oprot thrift.TProtocol) error

type KeyValueSetResult

type KeyValueSetResult struct {
	InvalidKey *InvalidKey `thrift:"invalidKey,1" json:"invalidKey,omitempty"`
}

Attributes:

  • InvalidKey

func NewKeyValueSetResult

func NewKeyValueSetResult() *KeyValueSetResult

func (*KeyValueSetResult) GetInvalidKey

func (p *KeyValueSetResult) GetInvalidKey() *InvalidKey

func (*KeyValueSetResult) IsSetInvalidKey

func (p *KeyValueSetResult) IsSetInvalidKey() bool

func (*KeyValueSetResult) Read

func (p *KeyValueSetResult) Read(iprot thrift.TProtocol) error

func (*KeyValueSetResult) String

func (p *KeyValueSetResult) String() string

func (*KeyValueSetResult) Write

func (p *KeyValueSetResult) Write(oprot thrift.TProtocol) error

type NotAuthorized

type NotAuthorized struct {
}
var AdminClearAllResult_NotAuthorized_DEFAULT *NotAuthorized

func NewNotAuthorized

func NewNotAuthorized() *NotAuthorized

func (*NotAuthorized) Error

func (p *NotAuthorized) Error() string

func (*NotAuthorized) Read

func (p *NotAuthorized) Read(iprot thrift.TProtocol) error

func (*NotAuthorized) String

func (p *NotAuthorized) String() string

func (*NotAuthorized) Write

func (p *NotAuthorized) Write(oprot thrift.TProtocol) error

type TChanAdmin

type TChanAdmin interface {
	TChanBaseService

	ClearAll(ctx thrift.Context) error
}

TChanAdmin is the interface that defines the server handler and client interface.

func NewTChanAdminClient

func NewTChanAdminClient(client thrift.TChanClient) TChanAdmin

NewTChanAdminClient creates a client that can be used to make remote calls.

type TChanBaseService

type TChanBaseService interface {
	HealthCheck(ctx thrift.Context) (string, error)
}

TChanBaseService is the interface that defines the server handler and client interface.

func NewTChanBaseServiceClient

func NewTChanBaseServiceClient(client thrift.TChanClient) TChanBaseService

NewTChanBaseServiceClient creates a client that can be used to make remote calls.

type TChanKeyValue

type TChanKeyValue interface {
	TChanBaseService

	Get(ctx thrift.Context, key string) (string, error)
	Set(ctx thrift.Context, key string, value string) error
}

TChanKeyValue is the interface that defines the server handler and client interface.

func NewTChanKeyValueClient

func NewTChanKeyValueClient(client thrift.TChanClient) TChanKeyValue

NewTChanKeyValueClient creates a client that can be used to make remote calls.

Jump to

Keyboard shortcuts

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