github.com/optim-corp/cios-golang-sdk@v0.5.1/sdk/service/video/init.go (about)

     1  package srvvideo
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/optim-corp/cios-golang-sdk/cios"
     7  )
     8  
     9  type CiosVideoStreaming struct {
    10  	ApiClient *cios.APIClient
    11  	Url       string
    12  	Host      string
    13  	withHost  func(context.Context) context.Context
    14  	refresh   func() error
    15  	token     *string
    16  }
    17  
    18  func (self *CiosVideoStreaming) SetToken(token string) {
    19  	if token == "" {
    20  		self.token = nil
    21  	} else {
    22  		self.token = &token
    23  	}
    24  }
    25  func (self *CiosVideoStreaming) SetRefresh(refresh func() error) {
    26  	self.refresh = refresh
    27  }
    28  
    29  func NewCiosVideoStreaming(apiClient *cios.APIClient, url string, withHost func(context.Context) context.Context) *CiosVideoStreaming {
    30  	return &CiosVideoStreaming{ApiClient: apiClient, Url: url, withHost: withHost}
    31  }